Welcome to the Treehouse Community
Looking to learn something new?
Kartik Kapoor3,016 Points
What is the need for using consol.log(my_array.toString()); ?
I see what difference it is making to the output but why is this happening?Why are we not getting the expexted result with " console.log(my_array); " ?
Rhonda Kate Johnson4,756 Points
I was curious about this too. I looked at a similar question for this lesson, and it seems we have to convert the array to a string because of a bug in certain browsers. Some browser versions (especially older ones) won't display the console.log for arrays properly, and so that's why our teacher has us convert it to a string. However, I think a lot of newer browser versions have corrected the issue, so that's why you might display console.log for an array properly without converting to a string.