Madyy Khoussa & obaid Rustemi#66
Open
pursuitMaddy wants to merge 1 commit intojoinpursuit:mainfrom
pursuitMaddy:main
Open
Madyy Khoussa & obaid Rustemi#66pursuitMaddy wants to merge 1 commit intojoinpursuit:mainfrom pursuitMaddy:main
pursuitMaddy wants to merge 1 commit intojoinpursuit:mainfrom
pursuitMaddy:main
Conversation
|
|
||
| const gameLoop = () => {}; | ||
| startGame(); | ||
| if (rls.keyInYN('Hey want to play?')) { |
| * | ||
| * @returns {number} - a number between 1 and 1000 | ||
| */ | ||
| const generateRandomNumber = () => { |
There was a problem hiding this comment.
This function is doing way too much. All this function should do is return a number between 1 and 1000. Use google to help you find how to make a random number in that range.
Author
There was a problem hiding this comment.
Hello Corey'
Thank you for the comment I also agree it is doing way way way way to much ;
below is what i simplified it to and it work.
const generateRandomNumber = () => {
let number = (Math.random() * 1000);
return number;
IvanCastillo1986
pushed a commit
to IvanCastillo1986/Guessing-Game-cli-lab
that referenced
this pull request
Feb 4, 2021
add some syntax highlighting and small wording edits
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
really not getting why the random number and number not registering