Rock, Paper, Scissors Project - Why didnt this work?

This did not return anything to the console and Im just wondering why after checking it multiple times. I know there are other ways to do it but this was the first way that came to my mind;

const getUserChoice = (userInput) => {
userInput = userInput.toLowerCase();
if (
userInput === “rock” ||
userInput === “paper” ||
userInput === “scissors”
) {
return userInput;
} else {
return “Invalid Input”;
}
};

const getComputerChoice = () => {
let numValue = Math.floor(Math.random() * 3);
switch (numValue) {
case 0:
return “rock”;
break;
case 1:
return “paper”;
break;
case 2:
return “scissors”;
break;
default:
return null;
}

console.log(getComputerChoice());
console.log(getComputerChoice());
console.log(getComputerChoice());
};

Your console.log statements are nested inside the body of the getComputerChoice function. They should be moved outside the function.

// You wrote:
return null;
}

console.log(getComputerChoice());
console.log(getComputerChoice());
console.log(getComputerChoice());
};

// It should be:
return null;
} // Closing brace of switch statement
};  // Closing brace of getComputerChoice function's body

console.log(getComputerChoice());
console.log(getComputerChoice());
console.log(getComputerChoice());