题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-03 11:31:06

[单选题]
(单选题)下面的代码输出的结果是()
Var name="Tom";
Function foo(){
Console.log(name);
Var name="Jerry";
Console.log(name);
}
Foo();
A.undefined
"Jerry"
B."Tom"
"Jerry"
C."Tom"
Undefined
D."Jerry"
"Jerry"

更多"[单选题](单选题)下面的代码输出的结果是()Var name='To"的相关试题:

[单选题]【单选题】
(单选题)下面的代码输出的结果是()
Var name="Tom";
Function foo(){
Console.log(name);
Var name="Jerry";
Console.log(name);
}
Foo();
A.undefined
"Jerry"
B."Tom"
"Jerry"
C."Tom"
Undefined
D."Jerry"
"Jerry"
[单选题]分析下面的JavaScript代码段,输出结果是( ) var mystring="I am a student"; a=mystring.charAt(9); document.write(a);
A.I am a st
B.U
C.Udent
D.T
[单选题]分析下面的 Javascript 代码段,输出结果是() var mystring=”I am a student”; var a=mystring.substring(9,13); document.write(a);
A.stud
B.tuden
C.uden
D.udent
[单选题]分析下面的 Javascript 代码段,输出结果是() var s1=parseInt(“101 中学”); document.write(s1);
A.NaN
B.101 中学
C.101
D.出现脚本错误
[单选题]分析下面的 JavaScript 代码段: function employee(name,code) { this.name="wangli"; this.code="A001"; } newemp=new employee("zhangming",'A002'); document.write("雇员姓名:"+ newemp.name+ "
"); document.write("雇员代号:"+ newemp.code +"
"); 输出的结果是().
A.雇员姓名:wangli 雇员代码:A001
B.雇员姓名:zhangming 雇员代码:A002
C.雇员姓名:null, 雇员代码:null
D.代码有错误,无输出结果
[单选题]下面这个 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 v1 = []
Var v2 = {};
Var v3 = {};
Function foo(v1, v2, v3)
{
V1 = [1];
V2 = [2];
V3 = {a:3}
}
Foo(v1, v2, v3);
Alert (v1);
Alert (v2);
Alert (v3.a);
A.空白
[object Object]
Undefined
B.1
2
3
C.空白
2
3
D.空白
2
Undefined
[单选题]
(单选题)以下代码的运行结果是(),var a="12px";var b=3;console.log(a+b);console.log(Number(a));
A.15px/12
B.12px3/12
C.15px/NaN
D.12px3/NaN
[单选题]【单选题】
(单选题)以下代码的运行结果是(),
Var x=true+1;
Var y=true+"1";
Var z=true+1+"1";
Console.log(x+","+y+","+z);
A."true1","true1","true2"
B.2,"true1","true11"
C.2,2,3
D.2,"true1","21"
[单选题]
(单选题)以下代码的运行结果是(),
Var x=true+1;
Var y=true+"1";
Var z=true+1+"1";
Console.log(x+","+y+","+z);
A."true1","true1","true2"
B.2,"true1","true11"
C.2,2,3
D.2,"true1","21"
[单选题]下面代码的输出结果是:()
Public class Main {
Public static void main(String[] args) {
Int n1 = 1;
Int n2 = 2;
N1 = n1 + n2;
N2 = n1 - n2;
N1 = n1 - n2;
System.out.println(n1 + "," + n2);
}
}
A. 1,2
B. 2,1
C. 1,3
D. 3,2
[单选题]【单选题】
(单选题)以下代码的运行结果是(),var a="12px";var b=3;console.log(a+b);console.log(Number(a));
A.15px/12
B.12px3/12
C.15px/NaN
D.12px3/NaN
[单选题]
(单选题)以下代码的输出结果是()
Var f = function g() {
Return 23;
};
Typeof g();
A."number"
B."undefined"
C."function"
D.Error
[单选题]
(单选题)以下代码的运行结果是(),
Var scope="global";
Function checkscope(){
Scope="local";
Myscope="local";
Return [scope,myscope]
}
Console.log(checkscope());
Console.log(scope);
Console.log(myscope);
A.先后输出值为["global","local"],global,local
B.先后输出值为["local","local"],local,local
C.先后输出值为["local","global"],global,local
D.先后输出值为["global","global"],local,local
[单选题]【单选题】
(单选题)下面运行的结果是()
Var v1 = []
Var v2 = {};
Var v3 = {};
Function foo(v1, v2, v3)
{
V1 = [1];
V2 = [2];
V3 = {a:3}
}
Foo(v1, v2, v3);
Alert (v1);
Alert (v2);
Alert (v3.a);
A.空白
[object Object]
Undefined
B.1
2
3
C.空白
2
3
D.空白
2
Undefined
[单选题]
(单选题)以下代码的输出结果是(),
Var scope="global scope";
Function checkscope(){
Var scope="local scope";
Function nested(){
Var scope="nested scope";
Return scope;
}
Return nested();
}
Console.log(checkscope());
A."global scope"
B."local scope"
C."nested scope"
D.null
[单选题]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

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码