Setup for JavaScript

  • Install VSCode text editor.
  • Install live server extension on VSCode

Shortcuts in VSCode for JavaScript Template

  • Press ! and press tab for HTML5 template

Write the below code in a index.html file

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
        // This is hello world
            This is multiline comment
        console.log("Hello World");

Rightclick on the VSCode text editor and click on Open with Live serve to open the code in the browser

Leave a Comment