In the .map() training, there is an exercise that asks to iterate through the array and divide each number in the array by 100.
Can someone explain why the formatting of the code changes the way the results are displayed in the console? Is there even an important difference between the two, other than saving one of the results to a variable?

const bigNumbers = [100, 200, 300, 400, 500];

** this way logs the numbers in an array horizontally:
const smallNumbers = bigNumbers.map(element => {
return element / 100

** this way logs the numbers without an array and vertically:
const smallNumbers = bigNumbers.map(element => {
console.log(element / 100)})

The first way saves the results to a variable and then prints it out after it is all done running the map function.

The 2nd way immediately prints each small number resulting from the division without saving them back into an array.

I think the missing piece of the puzzle is that console.log() automatically inserts a newline character at the end of the statement so that the next print statement will be on a new line. If you print an entire array in one shot, then you get a single new line at the end of the array. But if you print each element of an array individually, you will get a newline after every single element and so they will appear vertically. If that makes sense