With or Without Semi Colon?


Build "Rock, Paper, Scissors"

I'm not stuck this is more of a question. This code works with or without semi colons? Which is the best practice - with or without?

var userChoice = prompt ("Do you choose rock, paper or scissors?");

var computerChoice = Math.random();



with correctly placed semi-colons, like you did here


I was wondering the same thing. How is one "more" correct than the other, if they both work?


Your Guide to Semicolons in JavaScript by Codecademy
I think it looks better with semicolons.