Labs

  1. Create files named lab2.js and lab2.html.

  2. 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():

  3. undefined,null
  4. NaN, NaN
  5. new String('foo'), 'foo'
  6. '', false
  7. [1,2], '1,2'
  8. '1', true
  9. NaN, false
  10. 0, ''

  11. Assess the strict equality of the same pairs from #1.

  12. Use isNaN() to evaluate the JavaScript falsy values. What can and cannot be coerced into a number?

  13. undefined
  14. NaN
  15. null
  16. ''
  17. false
  18. 0

Prev -- Up