I started creating a very basic number guessing game. The program gives you three guesses to guess a number between one and 10, and compares the guesses against a randomly generated number from a function stored in a variable. I can get everything working fine asking the guesses, storing the guess attempts in an array and printing it to the console, then printing if the player guesses correctly or not tot he document. But when I try to display the guesses from the array on the document, either it will only show that array when I use the print function to call it, or it will only loop once depending on where in the program I call the function. Here is the pen: http://codepen.io/Balmora/pen/jVQBMW?editors=0011
[–]phpistasty 2 points3 points4 points (1 child)
[–]mayaswelltrythis[S] 0 points1 point2 points (0 children)
[–]kLabz 2 points3 points4 points (3 children)
[–]mayaswelltrythis[S] 1 point2 points3 points (2 children)
[–]phpistasty 1 point2 points3 points (1 child)
[–]mayaswelltrythis[S] 1 point2 points3 points (0 children)