var names = ["Hole-in-one!", "Eagle", "Birdie", "Par", "Bogey", "Double Bogey", "Go Home!"];
function golfScore(par, strokes) {
// Only change code below this line
return "Change Me";
// Only change code above this line
}
// Change these values to test
golfScore(5, 4);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36.
you need to return one of these strings depending on the number of strokes the player needed (strokes) to put the ball in the hole confronted to the optimal number of strokes (par)
so if the player needs one stroke the function returns Hole-in-one!, if they need the same number of strokes as the optimal number it returns Par and so on.
as you have an array and to avoid spelling errors I suggest you use the names array, instead of retyping the strings