单项选择题
A.var point=new Point(2,3);point.toString()//(2,3) B.var point=new Point(2,3);point.toString()//(3,2) C.var point=new Point(1,3);point.toString()//(2,3) D.var point=new Point(12,13);point.toString()//(2,3)
class Foo { constructor() { return Object.create(null);...
单项选择题class Foo { constructor() { return Object.create(null); }}Foo()//执行结果是什么?()
A.Object B.TypeError:Class constructor Foo cannot be invoked without’new’ C.Function D.String
类必须使用()调用,否则会报错。这是它跟普通构造函数的一个主要区别,后者不用()也可以执行A.new;newB...
单项选择题类必须使用()调用,否则会报错。这是它跟普通构造函数的一个主要区别,后者不用()也可以执行
A.new;new B.this;this C.prototype;prototype D.tostring;tostring
constructor方法默认返回(),完全可以指定返回另外一个对象A.字符串B.数组C.实例对象D.Set结...
单项选择题constructor方法默认返回(),完全可以指定返回另外一个对象
A.字符串 B.数组 C.实例对象 D.Set结构