Skip to content

Commit 2ecf1bf

Browse files
authored
Update js-mode "for" to keep up with modern JS syntax (#514)
"let" contains the scope of the variable to the loop, while "var" always declares global scope. Following up #305
1 parent f1907ed commit 2ecf1bf

File tree

1 file changed

+1
-1
lines changed
  • snippets/js-mode

1 file changed

+1
-1
lines changed

snippets/js-mode/for

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- mode: snippet; require-final-newline: nil -*-
22
# name: for
33
# --
4-
for (var ${1:i} = ${2:0}; $1 < ${3:collection}.length; $1++) {
4+
for (let ${1:i} = ${2:0}; $1 < ${3:collection}.length; $1++) {
55
$0
66
}

0 commit comments

Comments
 (0)