Update a few more vars to const in js/ts snippets

Fixes #35322
This commit is contained in:
Matt Bierner
2017-11-03 09:59:13 -07:00
parent ebffb73ed6
commit d2f1fd4763
4 changed files with 10 additions and 10 deletions

View File

@@ -25,7 +25,7 @@
"For-Each Loop": {
"prefix": "foreach",
"body": [
"${1:array}.forEach((${2:element}) => {",
"${1:array}.forEach(${2:element} => {",
"\t$0",
"});"
],
@@ -34,7 +34,7 @@
"For-In Loop": {
"prefix": "forin",
"body": [
"for (let ${1:key} in ${2:object}) {",
"for (const ${1:key} in ${2:object}) {",
"\tif (${2:object}.hasOwnProperty(${1:key})) {",
"\t\tconst ${3:element} = ${2:object}[${1:key}];",
"\t\t$0",

View File

@@ -25,7 +25,7 @@
"For-Each Loop": {
"prefix": "foreach",
"body": [
"${1:array}.forEach((${2:element}) => {",
"${1:array}.forEach(${2:element} => {",
"\t$0",
"});"
],
@@ -34,7 +34,7 @@
"For-In Loop": {
"prefix": "forin",
"body": [
"for (let ${1:key} in ${2:object}) {",
"for (const ${1:key} in ${2:object}) {",
"\tif (${2:object}.hasOwnProperty(${1:key})) {",
"\t\tconst ${3:element} = ${2:object}[${1:key}];",
"\t\t$0",