01219245/javascript1/tutorial1
รุ่นแก้ไขเมื่อ 14:58, 9 มกราคม 2557 โดย Jittat (คุย | มีส่วนร่วม)
- This is part of 01219245
The best way to learn a language is to use it.
In this tutorial, we will write a simple number guessing game in JavaScript. Your goal is to guess a number between 1 - 100. If you guess incorrectly, a hint is given to you: if your guess is too high or too low. The game proceeds until you guess correctly.
An example of the interaction is given below:
Round 1, your guess? 40 Too low. Round 2, your guess? 90 Too high. Round 3, your guess? 75 Too high. Round 4, your guess? 55 Great that's correct.