#Super Gross JavaScript Master# ###AKA MabLibs Knockoff!###
- In this assignment we start with a button on the screen that is inactive, we did this by using $(".generate").prop("disabled", true);. This was just put right into the html. Where .generate is the button.
- Next we created three separate json files where we had an array of different words.
- We then needed to create an ajax call within our document ready.
- We actually created three separeate ajax calls where we are calling in our three different files.
- Upon testing and seeing which call ran last (the last in the file) we put a complete: function which changed the button from disabled true, to disabled false.
- Then we declared three separarate arrays above our document ready. They are all empty for now.
- Inside of our ajax functions we added a line that pushed the words into our different arrays.
- Next We just created a random number function, which would spit out a random number and return it.
- Then we have a click event on the generate button which:
- sets a variable for a random number by doing this: getRandomNumber(0,9)
- with this variable we created another one where we are actually finding indece in the array of that number. Setting it to that new variable. Which upon console loging we see the random words are stored.
- Finally we are able to append our new random words onto the DOM below our button.
- One final task is to remove the words when the button is clicked again.
- Whalla!!!!! MAGIC!
##Heroku Link### https://quiet-tor-4135.herokuapp.com/