Skip to content
Snippets Groups Projects
Commit a86d675e authored by Sarah Fiedler's avatar Sarah Fiedler
Browse files

add Computer Choice

parent bd0bf2d3
No related branches found
No related tags found
No related merge requests found
const options = ["Stein", "Papier", "Schere"]; const options = ["Stein", "Papier", "Schere"];
function getRandomComputerResult(){ function getRandomComputerResult(){
console.log(Math.random()); const number = Math.floor(Math.random()*options.length);
return options[number];
} }
getRandomComputerResult();
\ No newline at end of file console.log(getRandomComputerResult());
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment