如何区分js字面量对象与类创建的对象?

如题

const a = {}

class B{}

const b = new B()

如何区分a和b


Preview:

Cancel
a.constructor
// ƒ Object() { [native code] }
b.constructor
// class B{}
Created at 7/2/2018, 8:10:37 AM