在下述实验代码中,表达式结果均为undefined: 复制代码 代码如下: var a; console.log(a); function Sample(x){ this.x = x; } var s = new Sample(); console.log(s.x) console.log(s.notExistVariable); var n = [2,3,4]; console.log(n[8]); function test(){ //no return value for this function } console.log(test()); function test2(){ return; } console.log(test2());