You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
It's not a huge deal anyway, but the for IN is ok(var), regular for loop too :
for (var variable in object) {
if (object.hasOwnProperty(variable)) {
}
} && for (var i = 0; i < array.length; i++) {
array[i]
}
Might also be time to use the LET keyword !
I always, for no good reason mind you... , wake up and figure out the variable's missing after a few seconds of debugging.and YES, I've created my own snippet by now, but still, this should be an easy fix.
Activity
chfritz commentedon Sep 16, 2018
Arcanemagus commentedon Sep 16, 2018
axe-z commentedon Sep 16, 2018
It's not a huge deal anyway, but the for IN is ok(var), regular for loop too :
for (var variable in object) {
if (object.hasOwnProperty(variable)) {
}
} && for (var i = 0; i < array.length; i++) {
array[i]
}
Might also be time to use the LET keyword !
I always, for no good reason mind you... , wake up and figure out the variable's missing after a few seconds of debugging.and YES, I've created my own snippet by now, but still, this should be an easy fix.
fd-rey commentedon Nov 21, 2018
I've the same issue, for...of is creating code that produces ReferenceError.
I think that a possible solution could be modify this file:
https://github.com/atom/language-javascript/blob/master/snippets/language-javascript.cson
setting this line
'for of': 'prefix': 'forof' 'body': 'for (${1:variable} of ${2:iterable}) {\n\t$3\n}'to this one (add var before the variable)
'for of': 'prefix': 'forof' 'body': 'for (var ${1:variable} of ${2:iterable}) {\n\t$3\n}'axe-z commentedon Nov 21, 2018