Web Development Tutorial – JavaScript, HTML, CSS – Rock Paper Scissors Game

Godaddy videos and tutorials just for you.
Lightning fast hosting for a shockingly low price! 50% off GoDaddy Hosting plans

This web development tutorial shows how to use JavaScript, HTML, and CSS to create a Rock Paper Scissors Game in the browser.

Tutorial by whatsdev. Check out their channel: https://www.youtube.com/channel/UC0tRdbXVDbhaRvZPKsRgmxg

Code link coming in a few days.

Learn to code for free and get a developer job: https://www.freecodecamp.org

Read hundreds of articles on programming: https://medium.freecodecamp.org

And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp




[su_feed url=”http://davidwalsh.name/feed” limit=”20″]

45 thoughts on “Web Development Tutorial – JavaScript, HTML, CSS – Rock Paper Scissors Game”

  1. You can use replacing of user/comp chooses to numbers and compare what is bigger. I think, it's better than "switch case" solution. So, if you add another game object to system or more than two players – you will need change cases for all results.

  2. Just ran through the entire tutorial now. Thank you so much for the upload, learnt quite a bit and really excited to be adding interactivity to my own website soon. Keep up the good work.

  3. 52:40 switch (userChoice + computerChoice) {
    case 'rs':

    case 'sp':

    case 'pr':
    console.log('User wins');
    console.log(userChoice, computerChoice);

    case 'rp':

    case 'ps':

    case 'sr':
    console.log('Computer wins');
    console.log(userChoice, computerChoice);

    console.log('Match drawn');
    console.log(userChoice, computerChoice);
    } this reduces some extra line

Leave a Reply

Your email address will not be published. Required fields are marked *