Golf Code (if ~ else if)
if()~ else if() 를 이용하여 Strokes의 값에 따랴 아래 표의 값이 return될 수 있게 작업합니다. Strokes Return 1 "Hole-in-one!" = par + 3 "Go Home!" par and strokes will always be numeric and positive. We have added an array of all the names for your convenience. 답은 아래 ... const names = ["Hole-in-one!", "Eagle", "Birdie", "Par", "Bogey", "Double Bogey", "Go Home!"]; function golfScore(par, strokes) { // Only change code bel..
freeCodeCamp
2023. 1. 9. 17:20