官术网_书友最值得收藏!

Exercises

  1. What is the result of executing each of these lines in the console? Why?
    • var a; typeof a;
    • var s = '1s'; s++;
    • !!"false"
    • !!undefined
    • typeof -Infinity
    • 10 % "0"
    • undefined == null
    • false === ""
    • typeof "2E+2"
    • a = 3e+3; a++;
  2. What is the value of v after the following?
    >>> var v = v || 10;

    Experiment by first setting v to 100, 0, null, or unset it (delete v).

  3. Write a script that prints out the multiplication table. Hint: use a loop nested inside another loop.
主站蜘蛛池模板: 凌云县| 武汉市| 尚志市| 余庆县| 盐池县| 孟州市| 门头沟区| 海晏县| 长岛县| 高雄市| 瑞金市| 锡林郭勒盟| 石家庄市| 松滋市| 始兴县| 昌图县| 汝城县| 永平县| 霍州市| 肇源县| 孟津县| 四川省| 丹寨县| 西宁市| 高邑县| 长治市| 武川县| 温州市| 潼南县| 赣榆县| 丽水市| 宁都县| 西城区| 买车| 安多县| 六枝特区| 汝城县| 襄汾县| 福泉市| 建平县| 贡觉县|