Javascript: I have a dynamically filled array named resultsAuthor, when I log this object, I get this. (logged it because I need the length to loop through the object and this wasn't working) 1 But when I try to log resultsAuthor.length, I get 0. Anyone know what I'm doing wrong?
From there I call it in my main.js like this:
var searchCriteria = document.querySelector('[title="tbxZoeken"]').value;
var searchAuthor = new Utils.GetBookinfoByAuthor(searchCriteria);
var resultsAuthor = searchAuthor.loadData();
console.log(resultsAuthor); // returns the object
console.log(resultsAuthor.length); // returns 0
Thanks!