diff --git a/README.md b/README.md index 499e2ca..fceeac5 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ Below is a list of all available snippets and the triggers of each one. The ** | `sto→` | set timeout helper method `setTimeout(() => {});` | | `prom→` | creates a new Promise `return new Promise((resolve, reject) => {});`| | `thenc→` | adds then and catch declaration to a promise `.then((res) => {}).catch((err) => {});`| +| `var→` | creates a new variable `var variable = value;` | ### Console methods | Trigger | Content | diff --git a/snippets/snippets.json b/snippets/snippets.json index 74dee93..b11c622 100644 --- a/snippets/snippets.json +++ b/snippets/snippets.json @@ -221,5 +221,10 @@ "prefix": "cte", "body": "console.timeEnd(${1:object});", "description": "Sets end point for execution time measurement" - } + }, + "DeclareVariable":{ + "prefix": "var", + "body": "var ${1:variable} = ${2:value};", + "description": "Declare a variable." + } }