更多"[单选题]function Foo(){
var i=0;
retur"的相关试题:
[单选题]下面这个 JS 程序的输出是什么:
function Foo() {
var i = 0;
return function() { console.log(i++);
}
}
var f1 = Foo(),
f2 = Foo();
f1();
f1();
f2();
A.0 1 0
B.0 1 2
C.0 0 0
D.0 0 2
[单选题]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.bar bar bar bar
B.bar bar bar undefined
C.bar bar undefined bar
D.undefined bar undefined bar
[单选题]分析下面的 Javascript 代码段,输出结果是()
var mystring=”I am a student”;
var a=mystring.substring(9,13);
document.write(a);
A.stud
B.tuden
C.uden
D.udent
[单选题] What do you do when you have a 1-jiao coin in your pocket? Perhaps you buy a piece of candy. Maybe you give it to a homeless man in the street. But have you ever used a jiao to fly to a foreign country? Last summer, I flew from London, UK, to Madrid, Spain, and then on to Faro, Portugal, and all the way back home. The cost of these four flights was just 4 pence (4 jiao). It even included all the taxes. Although it was a special offer, it is common to be able to fly between Europe’s major cities for around £20 a journey. These days, many young people, especially students, choose this cheap travel as a way of visiting countries around Europe. But don’t expect to be treated like royalty (皇族). Seats are normally cramped, in order to pack as many people as possible onto the flight. Food and drink, which tends to be provided for free on an airplane, is costly. And if you want to watch a movie to pass the time, you’d better buy a potable DVD player with you. The problem with these flights is that added extras cost a lot of money. If you want to buy food on the plane, check-in a big suitcase and get a priority-boarding pass that allows you to skip the line, you can end up paying close to the price of a normal flight. [共5题]
What did the author do with several 1-jiao coins?
A. He bought some candy.
B.He gave them to a homeless man.
C. He traveled four countries.
D. He took four flights.
[单选题] Don’t worry! Just do it ________ I do it.
A. like
B.since
C. for
D. as
[单选题]foo 对象有 att 属性,那么获取 att 属性的值,以下哪些做法是不可以的:()
A.foo.att
B.foo(“att”)
C.foo*“att”+
D.foo*“a”+”t”+”t”+
[单选题]As a secretary, I have to do lots of things,( ) making coffee for the boss.
A.
including
B.
in
C.
instead
D.
except
[单选题]JavaScript 定义 var a="40",var b=7,则执行 a%b 会得到()。
A.5
B."5"
C.undefined
D.null
[判断题] Hello,what can I do for you?您好,请问您要去哪里?
A.正确
B.错误
[单选题]JS 语句
var a1=10; var a2=20;
alert(“a1+a2=”+a1+a2)
将显示( )结果
A.a1+a2=30
B.a1+a2=1020
C.a1+a2=a1+a2
D.以上都不正确
[单选题]KZS/M. I型轴报器中液晶显示器的DO~D7为( )。
A.LCD的数据线
B.读写线
C.LCD模块寄存器选择线
D.液晶显示用电源
[单选题]有以下程序
main()
{int i;
for(i=1;i<=40;i++)
{if(i++%5==0)
if (++i%8==0) printf("%d",i) ;}
printf("\n") ;} 执行后的输出结果是()。
A.5
B.24
C.32
D.40
[单选题]与MOV AX,OFFSET VAR指令完全等效的指令是( )。
A.MOV AX,VAR
B.LDS AX,VAR
C.LES AX,VAR
D.LEA AX,VAR
[单选题]有以下程序段
int i,n;
for(i=0;i<8;i++)
{ n=rand()%5;
switch (n)
{ case 1:
case 3:printf("%d\n",n); break;
case 2:
case 4:printf("%d\n",n); continue;
case 0:exit(0);
}
printf("%d\n",n);
}
以下关于程序段执行情况的叙述,正确的是( )。
A.for循环语句固定执行8次
B.当产生的随机数n为4时结束循环操作
C.当产生的随机数n为1和2时不做任何操作
D.当产生的随机数n为0时结束程序运行