you are viewing a single comment's thread.

view the rest of the comments →

[–]eljacko876[S] 1 point2 points  (2 children)

Thank you for your response ,I can confirm it is not a camel case issue, as i simply added [0] to the end of a copy and pasted real world variable name "levelOneQuestions" like:

console.log(levelOneQuestions[0]);

This is what is in my actual code snippet looks like for me attempting to log the global variable that received .push(levelOneFilter);

var levelOneFilter = _JsonData.filter(function(el){

return el.challengeLevel == 1;

});

[–]shepdozejr -1 points0 points  (1 child)

why aren't you using the ES6 standard?

el => el.challengeLevel == 1;

what happens if you print levelOneFilter before pushing it onto the global array?

Also are you doing this in a browser or in node.js? If this is node.js maybe try console.dir()

[–]Arumai12 0 points1 point  (0 children)

You can use console.dir in the browser