how to use javascript in vscode code example

Example 1: how to run javascript program in visual studio code

id =vinay;
const mul=function multi(a,b) {
  return (a*b)
  document.getElementById("vinay").innerHTML=mul(5,8)
}

Example 2: vs code enable "html" in "javascript"

"emmet.includeLanguages": {
    "javascript": "javascriptreact",
    "vue-html": "html",
    "razor": "html",
    "plaintext": "pug"
}

Example 3: how to run javascript in visual studio code

// install live server and then right click on your index.html and the keep the browser ready

Tags:

Html Example