How to custom multiple snippets in VS Code?

I custom a snippet in VS code.And code as below:

"angular2-logger": {
    "prefix": "log",
    "body": [
        "this.log.log('$1');"
    ],
    "description": "使用angular2-logger的log功能"
}

But what if wanna add more snippets?Who can give me a demo?


Solution 1:

Just add a comma in the end after the parentheses and create your next snippet.

For example:

"angular2-logger": {
    "prefix": "log",
    "body": [
        "this.log.log('$1');"
    ],
    "description": "使用angular2-logger的log功能"
},
"Console.log": {
  "prefix": "log",
  "body": [
    "console.log($1);"
  ],
  "description": "Console.log"
}