en.javascript.info/1-js/04-object-basics/01-object/3-is-empty/solution.md
Ilya Kantor 9ad9063d00 up
2016-11-28 21:35:42 +03:00

11 lines
189 B
Markdown

Just loop over the object and `return false` immediately if there's at least one property.
```js
function isEmpty(obj)
for(let key in obj) {
return false;
}
return true;
}
```