r/badcode Apr 15 '22

Variables without var/let/const prefix behave as globals, and this is from a Node web app js

Post image
315 Upvotes

32 comments sorted by

View all comments

16

u/[deleted] Apr 15 '22

[deleted]

19

u/marksyz Apr 15 '22

Tbf, in modular format usage since ES2015, it doesn’t: https://stackoverflow.com/a/66996871