Comment the code in visual studio code for mac

broken image

We’ll work more on this later, but we can use the Format Document command to start. With the Prettier extension installed, we can now leverage it to format our code. If you’re installing it for the first time, you’ll see an “install” button instead of the “uninstall” button you see on mine. To work with Prettier in Visual Studio Code, you’ll need to install the extension. you may or may not like the optional parenthesis surrounding the parameter of the arrow function.the console statement inside of the function should be indented.the first property of the person object should be on its own line.If you’re picky about code formatting, you might pick up on some apparent missteps immediately. Sample Codeįor demo purposes, here’s the sample code we will be formatting. The beauty of modern-day web development is that the tooling has gotten so much better! This article will guide you through setting up Prettier to format your code in Visual Studio Code automatically. Formatting code consistently can be a challenge, especially when working on a team.