Golf score lab test

Can someone please explain why user story 10 is correct?

golfScore should return "Go Home!" if strokes is greater than par plus 3

My code passes all but test 13.

I put the condition:

strokes > par + 3

And test 13 doesn’t pass.

I put the condition as

strokes >= par + 3

And the code passes.

Should the user story should be changed to reflect the condition that passes?

I have seen this issue but the user story hasn’t been updated.

the user story has been updated, see here

the issue is that the condition where strokes is equal to par + 3 is missing if you write

depending on how you have written things that would mean your function is returning undefined or the wrong thing

I may be completely missing something.

You’re right that my code didn’t pass when I wrote

strokes > par + 3

User story 10 is prompting users to write the wrong answer.

golfScore should return "Go Home!" if strokes is greater than par plus 3.“

Why isn’t the user story changed to ““golfScore should return "Go Home!" if strokes is greater than or equal topar plus 3.““ User story 5 adds “or equal to”, for consistency shouldn’t it also be added to user story 10?

this has already been fixed, look at the code file I posted

1 Like

Ah got you. It hasn’t gone live yet on the page