본문 바로가기
coding/javascript

섭씨 온도를 화씨 온도 단위로 나타내기

by 코딩희송 2021. 10. 14.
let celsius = [-15, -5, 0, 10, 16, 20, 24,32];
let fahrenheit = celsius.map(c => c * 1.8 + 32);

//=> fahrenheit is [5, 23, 32, 50, 60.8, 68, 75.2, 89.6]

댓글