6 ms·
Just 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
by dugword 9y ago
Just 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.