Code Monkey home page Code Monkey logo

schaar-steen-papier's Introduction

Rock Paper Scissors

The rock paper scissors game is playable here.

Why did I make this game? πŸ—ΏπŸ—ΏπŸ—Ώ

This game was assigned to me as an exercise to learn JavaScript.

What were the learning objectives? πŸ“ƒπŸ“ƒπŸ“ƒ

The learning objectives were to learn how to use random in js and generate if statements. I also learned how to use the switch method with cases and how to use a function to capitalize instances of words and replace them in functions.

How did I make the game? βœ‚οΈβœ‚οΈβœ‚οΈ

I followed a nifty tutorial on youtube that showed me how to set up the initial functions I needed. I set the default text and the text for choices of rock, paper, and scissors. I set up a switch statment with different cases to determine who won.

How does the game look and work? πŸ–₯️πŸ–₯️πŸ–₯️

In terms of CSS, I set up the 3 choices as buttons in a row with a icon of rock paper and scissors inside each respectively, and a reset button underneath. The user clicks on either rock, paper, or scissors and the innerHTML of the welcome message changes based on who won.

schaar-steen-papier's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.