JavaScript小测试 - FT商学院
开始测试
测试您的JavaScript知识
单选题
下面这行会返回什么值? "" ? "a" : "b"
  • ""
  • a
  • b
  • undefined
单选题
The length property of an Array object is always:
  • Equal to the number of properties in that object
  • Equal to the highest index of that object +1
  • Equal to the highest index of that object
单选题
执行这句之后 var x = 1 == '1';
x的值为
  • 1
  • '1'
  • false
  • true
  • undefined
单选题
执行这句之后 var x = 1 === '1';
x的值为
  • 1
  • '1'
  • false
  • true
  • undefined
单选题
var str = "what is this"; var x = str.search("is");
What is the value of x?
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
单选题
Which of the following is not a method in the "JSON" object according to the ECMAScript specification?
  • JSON.fromString
  • JSON.stringify
  • JSON.parse
单选题
Which is not a primitive data type in JavaScript?
  • string
  • character
  • number
  • boolean
单选题
var myVar = '5'; var myAddedVar = myVar + 10;
myAddedVar的值为:
  • NaN
  • 510
  • '510'
  • 程序将出错
  • 15
单选题
var x = ['foo', 'bar']; x.length = 1;
x的值为:
  • ['foo', 'bar']
  • ['foo', 'bar', 1]
  • ['foo']
  • ['bar']
  • []
单选题
var x = "hello"; (function() { x = "goodbye"; }());
x的值为:
  • "hello"
  • "goodbye"
  • undefined 并抛出语法错误
单选题
var data = [1, 2, 3, 4, 5, 6]; data.shift();
data的值为:
  • [1, 2, 3, 4, 5]
  • [2, 3, 4, 5, 6]
  • [undefined, 1, 2, 3, 4, 5]
  • [6, 1, 2, 3, 4, 5]
  • [undefined, 2, 3, 4, 5, 6]
单选题
var _ = '_'; x = parseInt(_);
x的值为:
  • NaN
  • '/e242'
  • 242
  • Syntax Error: unexpected identifier
  • Type Error: incorrect type of argument, expect Number but was String
单选题
var x = typeof null;
x的值为:
  • "undefined"
  • "object"
  • "null"
  • "array"
  • "string"
单选题
var x = typeof null123;
x的值为:
  • "undefined"
  • "object"
  • "null"
  • "array"
  • "string"
单选题
var x = 1 + 5 + " bottles of milk";
x的值为:
  • "15 bottles of milk"
  • "6 bottles of milk"
  • "5 bottles of milk"
  • NaN
  • Undefined
单选题
var x = (NaN === NaN) ? true : false;
x的值为:
  • true
  • false
  • 语法错误
单选题
function foo(y) { var z = 10; z = 7; }; var x = foo("bar");
x的值为:
  • 7
  • null
  • undefined
  • 10
  • "bar"
总结
您的得分: 平均分: 8 最高分: 11
:
-
+
自动滚屏

现在退出会丢失进度,确定吗