✏️6.9 여러 함수를 클래스로 묶기 (Combine Functions into Class)
function base(aReading) {...}
function taxableCharge(aReading) {...}
function calculateBaseCharge(aReading) {...}class Reading {
base() {...}
taxableCharge() {...}
calculateBaseCharge() {...}
}🧷 배경
🧷 절차
🧷 리팩터링 전
🧷 리팩터링 후
Previous6.8 매개변수 객체 만들기 (Introduce Parameter Object)Next6.10 여러 함수를 변환 함수로 묶기 (Combine Functions into Transform)
Last updated