Closed CoreyFedde closed 7 years ago
One possible issue is that I believe length
is a reserved property name, and may cause some weird behavior if you create your own property called length
. Try calling your property something else - if you still get an issue, let me know and I'll come check it out.
Still showing up as undefined
There was an issue with an asynchronous function. By placing the line to display text as the value of the object.length in the initial function, it was fixed.
Hi,
I'm importing an object from another file named gamesPlayed. When I console.log gameActions.gamesPlayed I get an object with a length property nested within it. But when I console.log gameActions.gamesPlayed.length, it comes back as undefined.
Any thoughts on how to access it?
gameActions file
logic file
Results of the last two console logs:
" this is gameActions.gamesPlayed
Object {} length: 82 proto: Object
" this is gameActions.gamesPlayed.length undefined"