• 首页

  • 题库

  • 网课

  • 在线模考

  • 搜标题
  • 搜题干
  • 搜选项
单项选择题

执行以下代码,alert的输出结果为()
var msg = 'hello';for (var i = 0; i< 10; i++){ var msg = 'hello' + i * 2 + i;}alert(msg);

A.hello
B.hello189
C.hello30
D.hello27

题目列表

你可能感兴趣的试题

  • 单项选择题

    分析下面javascript代码:< script>function out(x){var temp =2;function inside(y){document.write(x +y +(temp--));}inside(5);}out(3);输出结果为:()

    A.8
    B.9
    C.10
    D.11

  • 单项选择题

    下面这段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.barbarbarbar
    B.barbarbarundefined
    C.barbarundefinedbar
    D.undefinedbarundefinedbar

版权所有©考试资料网(ppkao.com) 长沙求知信息技术有限公司 All Rights Reserved

湘公网安备 43010202000353号备案号: 湘ICP备14005140号-2

经营许可证号 : 湘B2-20140064