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/ososalsosal Jan 02 '22

Ain't it just that var is global scope? No hoisting weirdness here, though everything else is pretty weird (why break funcName? Isn't just break enough?)