diff --git a/UltiSnips/javascript.snippets b/UltiSnips/javascript.snippets index bc530e9..d458750 100644 --- a/UltiSnips/javascript.snippets +++ b/UltiSnips/javascript.snippets @@ -39,8 +39,8 @@ for (var ${2:i} = ${1:Things}.length - 1; $2 >= 0; $2--) { endsnippet snippet for "for (...) {...}" -for (var ${2:i}=0; $2 < ${1:Things}.length; $2++) { - ${3:$1[$2]}${VISUAL}$0 +for (var ${1:i} = 0, ${2:len} = ${3:Things}.length; $1 < $2; $1++) { + ${4:${3}[$1]}${VISUAL}$0 } endsnippet