Project: Guess The Number Game

The Game

Thinking like a programmer

One of the hardest things to learn in programming is not the syntax you need to learn, but how to apply it to solve real world problems. You need to start thinking like a programmer — this generally involves looking at descriptions of what your program needs to do, working out what code features are needed to achieve those things, and how to make them work together.

This requires a mixture of hard work, experience with the programming syntax, and practice — plus a bit of creativity. The more you code, the better you'll get at it. We can't promise that you'll develop "programmer brain" in five minutes, but we will give you plenty of opportunity to practice thinking like a programmer throughout the course.

With that in mind, let's look at the example we'll be building up in this article, and review the general process of dissecting it into tangible tasks.

Example — Guess the number game

In this article we'll show you how to build up the simple game you can see below:

Have a go at playing it — familiarize yourself with the game before you move on.




Source: Mozilla, https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/A_first_splash
Creative Commons License This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.