Return statments [SOLVED]


var compare = function(choice1, choice2) {
if (choice1 === choice2) {
return "The result is a tie!";
I don't need help i just wanna know why can't you use print instead of return???


Because return ends a function, so the rest of the function doesn't need to be executed. since given a result is all this function does, it good to end the function, the function served its purpose