I am trying to read a file (stored on the web server) into an array. When I print the array I currently get "undefined". Here is the code im using:
var cardRules = new Array;
$.get('UserFile.txt', function(data){
var array = data.split('\n');
console.log(cardRules);
});
Any help would be appreciated!