This commit is contained in:
Ilya Kantor 2017-08-22 23:19:09 +02:00
parent 25e97bb50e
commit 468a769b51
3 changed files with 5 additions and 6 deletions

View file

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