Basic JavaScript Question:

How to comment JavaScript code?

Tweet Share WhatsApp

Answer:

Use // for a single line comments in JavaScript and
/* start of Multiple lines comment in JavaScript

Multiple line comments in JavaScript

*/ for block comments in JavaScript

Download JavaScript PDF Read All 114 JavaScript Questions
Previous QuestionNext Question
How to hide JavaScript code from old browsers that don't run it?Name the numeric constants representing max, min values?