标签: javascript angularjs
我有一个对象如下:
this.student = {}; this.student.id = ''; this.student.name = ''; this.student.class = ''; this.student.percentage = '';
如何检查我的学生对象是否为空?
答案 0 :(得分:0)
要检查bject为空,请尝试此
Object.keys(this.student).length === 0