Correct answer prints but is not being recognized
See original GitHub issueGolf Code under JavaScript course
The test requests:
Strokes Return
1 "Hole-in-one!"
<= par - 2 "Eagle"
par - 1 "Birdie"
par "Par"
par + 1 "Bogey"
par + 2 "Double Bogey"
>= par + 3 "Go Home!"
My code: javascript
function golfScore(par, strokes) {
// Only change code below this line
if (strokes == 1)
{
return "Hole-in-one!";
}
else if (strokes <= (par -2))
{
return "Eagle";
}
else if (strokes == (par -1))
{
return "Birdie";
}
else if (strokes == par)
{
return "Par";
}
else if (strokes == (par + 1))
{
return "Bogey";
}
else if (strokes == (par + 2))
{
return "Double Bogey";
}
else if (strokes >= (par + 3))
{
return "Go Home";
}
else
{
return "Change Me";
}
// Only change code above this line
}
// Change these values to test
golfScore(5, 4);
It says the following is not done:
golfScore(4, 7) should return "Go Home!"
golfScore(5, 9) should return "Go Home!"
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to Solve a Printer Not Recognized Error - Driver Support
If your printer is giving you a not connected or recognized error, we can help. Here is a fixed guide to solve your...
Read more >Fix printer connection and printing problems in Windows
Check the cables (for wired printers). Make sure that the printer's USB cable is properly connected from the printer to your PC. If...
Read more >What to Do When Your Printer Won't Print - PCMag
Try printing the document again, and be sure to choose File > Print from the menu rather than using a shortcut. Then, pay...
Read more >13 Common Printer Problems and How to Fix Them
Turn on your printer using the power button, then turn on your computer again. Restart the print spooler service. Print your document.
Read more >Printer NOT Working / Offline / Not Recognized - Fix - YouTube
How to Solve a Printer Not Recognized Error What to Check When a ... is ready but not printing printer problems and solutions...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@chocolatechimpcookie thanks for the issue but if you get stuck or have questions with a challenge in the future, please first ask questions to the Help Room. Hint: look at the two tests you have pointed out and double check whether the strings it returns is exactly the same as what it requires. You have a missing character in the returned string. Happy coding!
Thank’s for help! You must change (=) (==). I fond solve in yor page and little change))