DevBin.log
로그인
DevBin.log
로그인
JavaScript Code Refactoring
Haebin Ethan Jeong
·
2020년 7월 21일
팔로우
0
JavaScript
0
Objective: To write a function that calculates your age.
My Original Code:
Very intuitive and easy to follow, but
long
.
Refactored code:
converting the date to miliseconds using .getTime().
Very short, but can't calculate the age before 1970.
Haebin Ethan Jeong
I'm a Junior studying Economics and Computer Science at Vanderbilt University.
팔로우
이전 포스트
JavaScript #2
다음 포스트
JavaScript #3 - Object and Class
0개의 댓글
댓글 작성