Created
December 30, 2018 01:08
-
-
Save joshuaaguilar20/b450b09eb3b78223c57779b0be889ac2 to your computer and use it in GitHub Desktop.
Math Object Notes for Marian
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
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random | |
Dev Docs | |
Jquery Documentation | |
https://api.jquery.com/ | |
function getRandomInt(max) { | |
return Math.floor(Math.random() * Math.floor(max)); | |
} | |
console.log(getRandomInt(3));//calling function | |
// expected output: 0, 1 or 2 | |
// expected output: a number between 0 and 1 | |
Jquery Documentation****** | |
https://api.jquery.com/category/events/ | |
1st way | |
$( "#html-Element_you_want-to-use" ).click(function() { | |
alert( "Handler for .click() called." ); | |
}); | |
2nd | |
function someFunction(){ | |
alert( "Handler for .click() called." ); | |
}; | |
$( "#html-Element_you_want-to-use" ).click(somefunction()); | |
//Load Random Target Score * | |
//Load Random Numbers for the Crystals* | |
//Add Random Number From Crystals onto Users Score Each Click * | |
//if user gets target number then you win the game * | |
//if the user gets MORE than Target Score you Lose * | |
//if number is less user Keeps Playing ** | |
// | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment