×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

Which is the correct syntax to declare a constant in JavaScript?

23. Which is the correct syntax to declare a constant in JavaScript?

  1. const constant_name;
  2. constant_name const;
  3. constant_name const = value;
  4. const constant_name = value;

Answer: D) const constant_name = value;

Explanation:

The correct syntax to declare a constant is:

const constant_name = value;

Example:

const PI = 3.14; 

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.