Inflearn Community Q&A
showAll 출력 없애는 코드
Written on
·
295
0
coworkers.showAll = function (){
for(var key in this) {
if (key !== 'showAll') {
document.write(key + ' : ' + this[key] + '<br>');
}
}
}
coworkers.showAll();
이렇게 하면되긴 하는데
문자열을 비교해서 하는 방법말고
객체안에 함수가 몇개가 더 생겻을때를 가정했을때를 위해
함수를 제외하고 출력하는 방법을 알고 싶습니다.
javascript
Answer
This question is waiting for answers
Be the first to answer!





