refactoring javascript1 Refactoring javascript 1 Clean coding in JavaScript 리팩토링 자바스크립트, 클린 코드 작성하기 Using the map function before const myList = list => { const newList = [] for (let i = 0; list.length; i++) { newList[i] = list[i] * 2 } return newList } after const myList = list => list.map(x => x * 2) Avoid callback hell with async/await before const sendToEmail = () => { getIssue().then(issue => { getOwner(issue.ownerId).then(owner => { send.. 2020. 9. 23. 이전 1 다음