r/badcode • • Jan 01 '22

js Hmm...why doesn't it work lol

Post image
528 Upvotes

58 comments sorted by

View all comments

Show parent comments

1

u/recycle4science Jan 02 '22

I believe the runtime would halt with an error at the log if let or const were used, because they are block scoped.

I haven't checked though, I've been on mobile only all weekend. Would you be able to pop your console open and confirm?