OK so I fixed my last error with the DIV and all..
OK so at the very top of my javascript file… I have
$(function() {
var games = new Array(); // games array
});
and then in a new function I have: var gamesLgth = games.length;
but when I run it, I get this: Uncaught ReferenceError: games is not defined
When I weird because I initalized it at the very beginning…
gamesis out of scope. You need to store it somewhere such that your other function can access it.For example, this will make your variable global.