en.javascript.info/1-js/04-object-basics/01-object/3-is-empty/solution.md
Ilya Kantor 468a769b51 fixes
2017-08-22 23:19:09 +02:00

10 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;
}
```