We’re going to make a simple implementation of grade-school classic "rock paper scissors". If you don’t know what that is check the wikipedia article or this ridiculous step-by-step. For the moment we’re just going to play the game from the browser console, but we will revisit it and add a front end later so don’t forget to keep the code on GitHub!
Before starting your first JavaScript Project, let’s talk about the most important skill for a developer: problem solving. Your primary goal as a developer is to use whatever programming language you know to solve problems.
For most beginners (in programming), problem solving can be a challenging skill regardless of the programming concepts or commands you know. Staring at a blank screen and not knowing where to start is a pretty common situation for beginner programmers. In order to overcome this blocking situations, here are some helpful techniques:
Make sure you understand exactly the problem you are trying to solve. Explaining the problem to someone or even yourself can greatly improve your understanding. Drawing diagrams or writing the problem on paper also helps a lot.
Come up with a Plan before starting to code. What are the steps that you need to follow and implement? In what order? What technologies, algorithms or commands must you use for each step? How can one step affect subsequent steps?
Write the solution in Pseudo Code. You don’t need to start writing JavaScript right ahead. Writing the solution in an easy to read and understand pseudo code helps you understand how each piece of the program fits in the big picture and also what’s the main responsibility of each code section. An example of a user input might be something like the following:
References:
Check the instructions here.
Once you’ve completed and tested your code submit the GitHub URL to the form below.
UPDATED: 04.05.2021