6. E se choice1 for pedra?


#1

Alguém pode me ajudar? Não consigo concertar, meu código está assim:


#2

@acacio360
With your

var compare = function(choice1,choice2) {
   if (choice1 === choice2) {
      return "....";
   }
};

you have =closed= the =function-definition= !!!

You will have to use

var compare = function(choice1,choice2) {
   if (choice1 === choice2) {
      return "....";
   }
   else if ( condicion ) {
      if ( condicion ) {
         ...
      }
      else {
         ....
      }
   }
};

Please read
http://www.codecademy.com/forum_questions/559dcb4be39efe550f00006b
and concentrate on:

  • the creation of the compare function
  • the truth-table
  • the build of the IF ELSE-IF statement structure as part of the compare FUNCTION-BODY
  • the execution of the compare function (keeping in mind that the return statement is used )

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.