Computer choice: part 2


This is all the code I have:
var userChoice = prompt("Do you choose rock, paper or scissors?")
var computerChoice = Math.random()
console.log(computerChoice) {

if (computerChoice = (0 - 0.33)) {
} else if (computerChoice = (0.34 - 0.66)) {
} else {

why does it give me: SyntaxError: Expected ';' message?

Under your existing code, write out the if / else if / else statement.
02. In the respective code blocks, change the value of computerChoice based on the rules stated above. Remember, you do NOT have to use var when changing the value of a variable that already exists.


the error message you see refers to this line:

console.log(computerChoice) {

why is there a { after a console.log? This should be a semi-colon. There are more flaws in your code but this should be a start


oh thank you :grin: :grinning:


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