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

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.
主站蜘蛛池模板: 阜康市| 岳阳市| 灵武市| 繁峙县| 嘉善县| 唐海县| 翁牛特旗| 奉化市| 红安县| 玉环县| 贵州省| 当涂县| 壤塘县| 天镇县| 长顺县| 平乡县| 习水县| 呼和浩特市| 当雄县| 盘山县| 紫金县| 玛纳斯县| 光泽县| 西畴县| 类乌齐县| 宝应县| 南昌县| 黄石市| 城口县| 汉中市| 盱眙县| 东至县| 新乡县| 沙坪坝区| 阳新县| 胶南市| 永泰县| 吉林市| 冷水江市| 汉川市| 珲春市|