- 0
- 0
- 约2.57千字
- 约 11页
- 2026-07-27 发布于江苏
- 举报
2026年大一js考试题及答案
试题:
一、单项选择题(每题2分,共20分)
1.在JavaScript中,哪个关键字用于声明变量?
A.var
B.let
C.const
D.allofabove
2.下列哪个不是JavaScript的数据类型?
A.string
B.number
C.boolean
D.float
3.如何正确地编写一个函数?
A.functionmyFunction()
B.defmyFunction()
C.funcmyFunction()
D.function:myFunction()
4.以下哪个是正确的JavaScript注释方式?
A.//thisisacomment
B./thisisacomment/
C.bothAandB
D.noneoftheabove
5.以下哪个是JavaScript中的逻辑“与”运算符?
A.
B.
C.AND
D.and
6.如何在JavaScript中创建一个数组?
A.varcolors=[]
B.varcolors=newArray()
C.bothAandB
D.noneoftheabove
7.以下哪个方法用于向数组末尾添加一个元素?
A.push()
B.pop()
C.shift()
D.unshift()
8.在JavaScript中,如何获取一个元素的HTML内容?
A.element.inner
原创力文档

文档评论(0)