en.javascript.info/1-js/4-object-basics/01-object/3-is-empty/solution.md
Ilya Kantor 4c531b5ae7 ok
2016-07-31 00:28:27 +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;
}
```