Skip to content

Instantly share code, notes, and snippets.

@AndrewAllison
Created April 21, 2017 06:04
Show Gist options
  • Save AndrewAllison/cc390c3c4641dbdd8195106b7e1e8c9e to your computer and use it in GitHub Desktop.
Save AndrewAllison/cc390c3c4641dbdd8195106b7e1e8c9e to your computer and use it in GitHub Desktop.
Vscode Snippets
{
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
},
"For Loop": {
"prefix": "for",
"body": [
"for (var ${1:index} = 0; ${1:index} < ${2:array}.length; ${1:index}++) {",
"\tvar ${3:element} = ${2:array}[${1:index}];",
"\t$0",
"}"
],
"description": "For Loop"
}
}
{
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
},
"Import LoDash": {
"prefix": "_i_",
"body": "import * as _ from 'lodash';",
"description": "Import statement for loDash"
},
"Import Statement": {
"prefix": "_i",
"body": "import { ${1:class} } from '${2:location}';",
"description": "Import statement"
},
"For Loop": {
"prefix": "for",
"body": [
"for (var ${1:index} = 0; ${1:index} < ${2:array}.length; ${1:index}++) {",
"\tvar ${3:element} = ${2:array}[${1:index}];",
"\t$0",
"}"
],
"description": "For Loop"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment