58

如何检查一个对象是否为空

 5 years ago
source link: https://juejin.im/post/5ca22c9ce51d45177f66c03b
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
⭐️ 更多前端技术和知识点,搜索订阅号 JS 菌 订阅 检查一个数组为空很容易,直接调用 length 方法即可,那么如何检查一个对象是否为空呢 ❓ 这里的空指的是对象没有自有属性 假设这里有两个对象,一个是 obj 一个是 anotherObj let

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK