Thanks for reading and bringing up the confusion. This happened due to my copy paste job from my notes. I have corrected it to var.
As a bonus, I have updated the blog post with an explanation of why let solves this problem as well (similar to closure + IIFE). This should answer the question you have 😅 If you still have any more questions please feel free to follow up.
Thanks for reading and bringing up the confusion. This happened due to my copy paste job from my notes. I have corrected it to
var
.As a bonus, I have updated the blog post with an explanation of why
let
solves this problem as well (similar to closure + IIFE). This should answer the question you have 😅 If you still have any more questions please feel free to follow up.Thank you for the quick response! Your explanation answered my question 😄