?
Consider the following code snippet
Consider the following code snippet
const pi=3.14;
var pi=4;
console.log(pi);
What will be the output for the above code snippet?
const pi=3.14;
var pi=4;
console.log(pi);
Answer & Solution
Correct Answer:
Option
A
The above code snippet will flash an error. Attempts to alter the value or re-declaration causes errors.
Join the Discussion
Login to post a comment or share your explanation.
Login