单项选择题
执行以下代码,alert的输出结果为()var msg = 'hello';for (var i = 0; i< 10; i++){ var msg = 'hello' + i * 2 + i;}alert(msg);
A.helloB.hello189C.hello30D.hello27
分析下面javascript代码:function out(x){var temp =2;function i...
单项选择题分析下面javascript代码:< script>function out(x){var temp =2;function inside(y){document.write(x +y +(temp--));}inside(5);}out(3);输出结果为:()
A.8B.9C.10D.11
下面这段JavaScript代码的的输出是什么?()var myObject = { foo: "bar", ...
单项选择题下面这段JavaScript代码的的输出是什么?()var myObject = { foo: "bar", func: function() { var self = this; console.log(this.foo); console.log(self.foo); (function() { console.log(this.foo); console.log(self.foo); }()); }};myObject.func();
A.barbarbarbarB.barbarbarundefinedC.barbarundefinedbarD.undefinedbarundefinedbar
var p3 = new Point(2,3);var p4 = new Point(3,2);p3.__pr...
多项选择题
var p3 = new Point(2,3);var p4 = new Point(3,2);p3.__proto__.printName = function () { return 'Oops' };p3.printName() p4.printName()var p5 = new Point(4,2);p5.printName() 控制台输出内容会有什么?()
A.第一行输出"Oops"B.第一行会报错C.第二行输出"Oops"D.第三行输出"Oops"