如何检查对象是否为空?
例如:
private brand:Brand = new Brand();
我试过了:
if(this.brand) { console.log('is empty'); }
不工作
javascript typescript
javascript ×1
typescript ×1