3 ms·
How is this different than prefixing variables with var in JavaScript?
by petre 9y ago
How is this different than prefixing variables with var in JavaScript?
- dugword 9y agoJust to be pedantic ;) var creates variables that are function scoped. my creates variables that are block scoped. let in JavaScript would be pretty much the same as my. Both are good things as they prevent typos from being new variables.