I successfully created 3 VSCode snippets, I added the 4th one.
{
"for": {
"prefix": "for",
"body": "for (i = 0; i < ${1:}.length; i++) {
console.log(${1:}[i]);
}"
}
}
IDE is highlighted as red, and I am not able to see it in the snippet list.
How can I fix that ?
As I type/select for should add this code. Hint: for is my snippet prefix.
for (i = 0; i < responses.length; i++) {
console.log(responses[i]);
}
I found a working solution, I achived it by doing this:
"FOR": {
"prefix": "for",
"body": [
"for (var i = 0; i < ${array}.length; i++) {",
"\tconsole.log(${array}[i]);",
"\t$0",
"}"
]
}
As I type
As I select