How to Create Absolutely Awesome Custom Code Snippets in VSCode
Create your own reusable lines of code
Code snippets are one of the easiest ways a developer can be more productive.
A code snippet is a small, reusable line of code that can save you from having to type repetitive code.
here is an example of using a code snippet in vs code:

To understand Code Snippets in VSCode, we will be creating a snippet that creates a switch statement with 3 cases and a default case.
Understanding The structure of a Snippet
Before we start creating snippets in VSCode we first need to understand the structure of a snippet.
Snippets in VSCode are written in JSON and in the following format:
"TestSnippet": {
"prefix": "tsn",
"body": "console.log('This is from a test snippet!);",
"description": "testing a snippet"
}The Different Parts of a Snippet
A snippet consists of four different parts: a prefix, a body, a description, and a name.
The prefix is a string that when typed will display the snippet.
The body is the content that will be displayed when the snippet is called.
The description is an optional description that is provided by IntelliSense.
And a name which is the name of the snippets and used in IntelliSense if the description is blank.
Creating our Snippet
now that we have a basic understanding of what makes a snippet, it's time to make our own custom snippet.
Opening the Snippet Menu
VSCode has a menu dedicated to user snippets.
If you are on windows the menu is at File > Preferences > User Snippets
On mac, the same menu can be found at Code > Preferences > User Snippets
After that, you will see a dropdown appear asking you for a language for your snippet. For this tutorial, we will be picking JavaScript.

Adding Custom Snippet to Javascript.json
Now that we have navigated to the correct file it is time to create our snippet.
the code for the snippet is below:

