1. Home
  2. Computer Science MCQs
  3. Javascript
  4. Which keyword is used to declare variables in JavaScript?

Added 28 Jan 2024

Which keyword is used to declare variables in JavaScript?

  1. var
  2. let
  3. const
  4. all of the above Correct answer

Correct answer

D. all of the above

17 views

MCQSEXAM

Explanation

JavaScript provides multiple keywords for variable declaration, including var, let, and const, each with different scoping rules.

Video explanation

Reference

https://www.w3schools.com/js/default.asp

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Javascript MCQs

Practise all Javascript MCQs

Similar MCQs