单项选择题
下面代码的输出是什么?()
let number = 0;
console.log(number++);
console.log(++number);
console.log(number);
A.1 1 2
B.1 2 2
C.0 2 2
D.0 1 2
点击查看答案
相关考题
-
单项选择题
下面代码的输出是什么?() function sum(a, b) { return a + b; } sum(1, "2");
A.NaN
B.TypeError
C."12"
D.3 -
单项选择题
下面代码的输出是什么?() function Person(firstName, lastName) { this.firstName = firstName; this.lastName = lastName; } const lydia = new Person("Lydia", "Hallie"); const sarah = Person("Sarah", "Smith"); console.log(lydia); console.log(sarah);
A.Person{firstName:"Lydia",lastName:"Hallie"} and undefined
B.Person {firstName: "Lydia", lastName: "Hallie"} and Person {firstName: "Sarah", lastName: "Smith"}
C.Person {firstName: "Lydia", lastName: "Hallie"} and {}
D.Person{firstName:"Lydia",lastName:"Hallie"}and ReferenceError -
单项选择题
下面代码的输出是什么?() var a = 3; var b = new Number; var c = 3; console.log(a == b); console.log(a === b); console.log(b === c);
A.true false true
B.falsefalse true
C.true false false
D.false true true
