Javascript Postincrementers

This commit is contained in:
Nguyen Le 2015-07-17 09:27:09 -07:00
parent 3569953261
commit c5000e2d77

View File

@ -88,12 +88,12 @@ snippet ret
# for loop # for loop
snippet for snippet for
for (var ${2:i} = 0, l = ${1:arr}.length; $2 < l; $2 ++) { for (var ${2:i} = 0, l = ${1:arr}.length; $2 < l; $2++) {
var ${3:v} = $1[$2];${0:} var ${3:v} = $1[$2];${0:}
} }
# Reversed for loop # Reversed for loop
snippet forr snippet forr
for (var ${2:i} = ${1:arr}.length - 1; $2 >= 0; $2 --) { for (var ${2:i} = ${1:arr}.length - 1; $2 >= 0; $2--) {
var ${3:v} = $1[$2];${0:} var ${3:v} = $1[$2];${0:}
} }
# While loop # While loop