// 객체 프로퍼티를 대상으로 반복문을 실행하다가 프로퍼티가 하나라도 있으면 그 즉시 false를 반환 function isEmpty(obj) { for (let key in obj) { // if the loop has started, there is a property return false; } return true; }
출처 https://ko.javascript.info/object#ref-592