I tried to execute following lines of code on Nodejs and chrome browser. In nodejs, it executed successfully But on chrome browser, it throws an error.
const undefined = 1;
console.log(undefined);
// Nodejs: prints 1
//chrome browser: VM359:1 Uncaught SyntaxError: Identifier 'undefined' has already been declared
If undefined is already declared as a value, don't you guys think undefined
is behaving a variable in nodejs ?