JS Intro to Function 13. Conclusion ( rock paper scissors game )


var game = function(number) {

var rock = 5;
var paper = 6;
var scissors = 7;

    if (rock < paper) 
        return ("Rock Wins!");

       (paper < scissors) 
        return ("Scissors Wins!");

        ( scissors < rock )
       return ("Rock wins!");



do you have a question?


hi rydan, I tried above, but I don't know how to call this function... thanks


according to the function definition, it takes in one argument(expected to be an integer). To call it you do


but you can also log the result of calling it to console like this



genius, thank you so much rydan!! but I am not sure if I have written the code correctly as per spec... moving on the next lessons, started to make !