8-5. 인라인 코드를 함수 호출로 바꾸기
적용 시점
절차
예시
❌Before
const user = { level: 70, killList: ['해골', '좀비', '박쥐', '사마귀대왕'] };
const findZombie = False;
for(const item of user.killList) {
if (item === '좀비') {
findZombie = True;
break;
}
}⭕After
Last updated