Home > Article > Web Front-end > Painful JavaScript syntax features_Basic knowledge
I saw some test questions related to JavaScript posted by someone on Zhihu, and I would like to share them with you. Although it was a long time ago, these questions are quite classic, which makes people think that JavaScript is really a painful language. .
1.
A. "object"
B. "array"
C. "arguments"
D. "undefined"
Answer: A
2.
A. "number"
B. "undefined"
C. "function"
D. Eerror
Answer: D
3.
A. 1
B. null
C. undefined
D. Error
Answer: A
4.
A. 1
B. "number"
C. undefined
D. "undefined"
Answer: D
5.
A. "number"
B. "undefined"
C. "function"
D. Error
Answer: A
6.
A. "undefined"
B. "object"
C. "number"
D. "function"
Answer: A
7.
A. "undefined"
B. "object"
C. "number"
D. "function"
Answer: A
8.
A. "string"
B. "number"
C. "function"
D. "undefined"
Answer: B
9.
A. 1
B. "1function"
C. "1undefined"
D. NaN
Answer: C
10.
A. "number"
B. "string"
C. "undefined"
D. "object"
Answer: B
11.
A. “undefined”
B. “object”
C. “number”
D. Error
Answer: A
12.
A、1
B. 2
C. Error (e.g. “Too much recursion”)
D、undefined
Answer: B
13.
A. true
B、false
Answer: B
14.
A、1
B. 2
C、undefined
D. Error
Answer: B
15.
Answer: A