fixes
This commit is contained in:
parent
25e97bb50e
commit
468a769b51
3 changed files with 5 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue