In the following code-snippet, the equation is manipulated right-to-left. typeof x returns undefiend
(but in string format), which gets stored in var x
. Now, we know "undefined" !== undefined
, as they are 2 different data-types.
Don't you guys think, Chrome is acting weird or Not-upto-the-mark by showing both the 2 items in same format in console-window? Isn't it wrong behavior? Please, help explain if I am right saying, Chrome should depict "undefined"
with double-quotes in console (To remove the confusion). Is this something that developers at Google missed out, or they did not care or they let this behavior (strings wihtout quotes in console) intentionaly?? I am confused. Pls, suggest your views.
var y = 1, x = y = typeof x;
console.log(x);
console.log(x === undefined);
console.log(x === "undefined");
console.log("undefined");
a = "Peter"; b = "Jacob";
console.log(a, b, "Ronald");