• 2022-06-12
    以下代码的运行结果是()。var a = '1';var a, b;console.log(a, b);
    A: undefined undefined
    B: null undefined
    C: 1 1
    D: 1 undefined
  • D

    内容

    • 0

      下列代码中a变量在控制台的输出结果是()。var a;console.log(a); A: null B: NaN C: undefined D: false

    • 1

      查看一下代码 ,请问输出正确的是|var Test ={| foo:"test",| func:function () {| var self=this;| console.log(this.foo);| console.log(self.foo);| (function () {| console.log(this.foo);| console.log(self.foo);| })();| }|};|Test.func(); A: test test undefined test B: test undefined undefined test C: test test undefined D: test test test test

    • 2

      console.log(null==undefined); A: true B: false C: 1 D: 0

    • 3

      以下哪个表达式结果为true() A: undefined==null B: undefined===null C: isNaN("100"); D: parseInt("1a")==1;

    • 4

      以下代码片段的输出结果为( ). &#91;script type="text/javascript"&#93; var foo =1; function Test(){ alert(foo); var foo=2; alert(foo); } Test(); </script A: 1,2 B: 2,1 C: 1,undefined D: undefined,2