Right-hand side of 'InstanceOf' is not an object

Trying to make a guessing game with Nightbot, keep getting the error in title. Can anyone help?

My code:
!editcom !guess $(eval var x = Math.floor((Math.random() * 10) + 1);var guess = "$(query)";if (x == guess) {"You got it right!"}; else {"You got it wrong! Try again!"})

Remove the semicolon (;) before the else

Ah, I didn’t catch that! Thank you!

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