๐Ÿ‘คjacobr๐Ÿ•‘3y๐Ÿ”ผ27๐Ÿ—จ๏ธ18

(Replying to PARENT post)

If your code is sufficiently distinct that block scope is useful, and there's no obvious contextual clue as to why it's distinct (like an if statement), put it in a separate function to explain why it's distinct. The article mentions this argument, but responds with some handwaving about how technically it's valid JS to use an unnamed block statement. I mean, sure, but does that mean it's a good idea?
๐Ÿ‘คculturedsystems๐Ÿ•‘3y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

Iโ€™ll just cross my fingers for do expressions getting adopted. Before then functions work for me and none of the gist convinced me otherwise.
๐Ÿ‘คteg4n_๐Ÿ•‘3y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

How about don't use let or var declarations at all?
๐Ÿ‘คtengbretson๐Ÿ•‘3y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

I had no ideas this was an option in JavaScript.

Fun read.

๐Ÿ‘คduxup๐Ÿ•‘3y๐Ÿ”ผ0๐Ÿ—จ๏ธ0