Labs
-
Create files named lab2.js and lab2.html.
-
Assess the equality of the following using the equality operator. Try to think what the result will be before printing the result with
console.log(): undefined,nullNaN,NaNnew String('foo'),'foo''',false[1,2],'1,2''1',trueNaN,false-
0,'' -
Assess the strict equality of the same pairs from #1.
-
Use
isNaN()to evaluate the JavaScript falsy values. What can and cannot be coerced into a number? undefinedNaNnull''false0