en.javascript.info/1-js/04-object-basics/01-object/3-is-empty/_js.view/solution.js
Ilya Kantor 360be9ed99 fix
2019-02-21 18:54:16 +03:00

7 lines
140 B
JavaScript

function isEmpty(obj) {
for (let key in obj) {
// if the loop has started, there is a property
return false;
}
return true;
}