We want to declare a distance constant and initialize it with the value 120. What should such a declaration look like?

  • Post author:
  • Post category:Q&A
  • Reading time:1 min read
  • Post last modified:March 15, 2025

We want to declare a distance constant and initialize it with the value 120. What should such a declaration look like?

  • const distance = 120;
  • const distance; distance = 120;
  • let distance; const distance = 120;
  • let constant distance = 120;
Answers Explanation & Hints:

In JavaScript, when declaring a constant using the const keyword, you need to provide both the constant name and its initial value in a single statement. Therefore, the correct way to declare and initialize the constant distance with the value of 120 is by using the code snippet above.

For more Questions and Answers:

JavaScipt Essentials 1 (JSE) | JSE1 – Module 2 Test Exam Answers Full 100%