An open API service indexing awesome lists of open source software.

https://github.com/glowiep/numberguesser

JavaScript Number guesser
https://github.com/glowiep/numberguesser

javascript personal-project

Last synced: about 1 month ago
JSON representation

JavaScript Number guesser

Awesome Lists containing this project

README

        

# numberguesser
JavaScript Number guesser



This was inspired by the LightHouse Labs Kata (stretch) assignment to create a number guessing game in JavaScript from scratch.

The npm prompt-sync package had to be used so that the 'guess' input by the user can be read directly from the command line in node.

(Check out the code for it here)

Upon completing the assignment I tinkered around so that the number guessing game works in a browser.



A few learnings along the way:



  • I decided against linking the JavaScript code that uses the npm package "prompt-sync" to my HTML code.


  • The "prompt-sync" module is primarily intended for use in Node.js environments, to use it in a web browser, another tool to bundle the code may need to be used to make it compatible with the browser environment.

Check out my number guesser in the browser.

Sources:

[1] CodePen by Luke Reid

[2] CodePen by Simon Prickett