branch: elpa/yasnippet-snippets commit 2ecf1bf59cecf03f71014a046146221975696290 Author: Hong Xu <h...@topbug.net> Commit: GitHub <nore...@github.com>
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 https://github.com/AndreaCrotti/yasnippet-snippets/pull/305 --- snippets/js-mode/for | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/js-mode/for b/snippets/js-mode/for index 1455afe756..b3be3a7d63 100644 --- a/snippets/js-mode/for +++ b/snippets/js-mode/for @@ -1,6 +1,6 @@ # -*- mode: snippet; require-final-newline: nil -*- # name: for # -- -for (var ${1:i} = ${2:0}; $1 < ${3:collection}.length; $1++) { +for (let ${1:i} = ${2:0}; $1 < ${3:collection}.length; $1++) { $0 } \ No newline at end of file