Heads up, Codecademy


When I was doing step 7 "What if choice 1 is paper?" of the rock scissor paper exercise, I reset my code and pressed the Save & Submit Code-button, it accepted my code as finished, then I proceeded to the next step, and that, too, accepted my code as finished.

This was all I needed to write.

var compare = function(choice1, choice2) {
    if(choice1 === choice2) {
        return "The result is a tie!";
    } else if (choice1 === "rock"){
        if (choice2 === "scissors") {
            return "rock wins";
        } else {
            return "paper wins";

Just so you know. A little hiccup, but I still appreciate the exercise. Thank you for providing it :slight_smile:


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