Lesson 5/9 in build "rock,Paper scissors" HELP please,


#1

var compare = function(choice1,choice2) {
if(choice1 === choice2) {
return "The result is a tie";
}
};
compare(1,1)


#2

Common mistake people keep making throughout the course.
Just copy-paste the text given in the instructions. Your code is fine.

return "The result is a tie!";

You're just missing the <!>at the end.


#3

Thanks, but where exactly do i put <!> ?


#4

"The result is a tie<!>";

The ! goes at the end of your sentence. You probably have to match the course words exactly.


#5

Its just surprising how anoying Codecademy gets sometimes, "oh look, your code doesnt have and exclamation point, well YOUR WRONG"


#6

The problem is that the check function is probably something like:

expectedOutput == userOutput

and a computer is dumb so a missing exclamation point is a whole different thing. Testing a user input is far from being trivial as you don't want users to pass with bad code but you don't want to discourage people using different but working code. On the one hand I totally agree with you that it is confusing that you do not pass although you used the right syntax etc but on the other hand programming languages are that picky, a missing }, ) or ; which seems harmless for a human can really cause big trouble, so training being careful isn't that bad after all.


#7

Useless course written and constructed by people who wish to confuse. I can programme in BASIC V (an ancient language I learned at school) but this course is so amateurish! It gives errors where there aren't any. Absolutely appauling.


#8

But the pickiness is not in the right place is it? I mean if it was a syntax error that's fair enough if it was real, but when it's a bit of communication, it's doesn't matter does it.


#9

Yes maybe one should change that to accepting strings that include the word "tie" case-insensitively.


#10

hahahahaa LOL thanks a lot!