21.) What is the output of the following code?
console.log(1 + "2" + 3);
22.) What is the result of the following code?
console.log(typeof NaN);
23.) What is the difference between == and === in JavaScript?
24.) What is the result of the following code?
let x = {};
let y = {};
console.log(x == y, x === y);
25.) What will the following code output?
(function() {
var a = b = 5;
})();
console.log(typeof a, typeof b);
26.) Which of the following statements is true about the ‘this’ keyword in JavaScript?
27.) What will the following code output?
let obj = {
a: 10,
b: function() {
return this.a + 20;
}
};
let fn = obj.b;
console.log(fn(), obj.b());