Node.js - Debugging and Profiling
What will be the output of this Node.js code snippet?
const x = 5;
console.log(x + y);
const y = 3;
const x = 5;
console.log(x + y);
const y = 3;
const are not hoisted like var. Accessing before declaration causes ReferenceError.console.log(x + y); runs before y is declared, causing ReferenceError.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions