Reputation: 14318
If you try to make console.log of a very long array, firebug console shows you just a part of the full result.
Example:
arr = [[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],[1,2,3],["casa","auto"],["casa","auto","casa","auto","casa","auto","casa","auto","casa","auto","casa","auto","casa","auto","casa","auto",[1,2,3],[1,2,3],[1,2,3],[1,2,3]]]
console.log(arr); // .... ["casa", "auto"], ["casa", "auto", "casa", 17 more...]]
In this case, it shows the first part of the array and then the word 17 more...]]
How can I show all the array result?
I would like to make copy and past. Unfortunately console.dir returns an javascript object browser.
Upvotes: 2
Views: 692
Reputation: 2879
I'm assuming that you just want to see the results. You can loop through the array and write out each array item.
for(var i=0; i<arr.length; i++){
console.log(arr[i]);
}
Upvotes: 1