单项选择题
function bark() {console.log("Woof!");}bark.animal = "dog";以上代码定义会发生什么?()
A.Nothing, this is totally fine!
B.SyntaxError. You cannot add properties to a function this way.
C.undefined
D.ReferenceError
点击查看答案
相关考题
-
单项选择题
function sayHi() {console.log(name);console.log(age);var name = "Lydia";let age = 21;}sayHi();以上方法sayHi输出的结果是?()
A.Lydia和undefined
B.Lydia和ReferenceError
C.ReferenceError和21
D.undefined和ReferenceError -
单项选择题
树形结构也被称为()结构
A.半线性结构
B.线性结构
C.逻辑结构
D.数组结构 -
单项选择题
通过()方法向Set结构加入成员,结果表明Set结构不会添加重复的值。
A.add()
B.push()
C.shift()
D.splice()
