![Hey! I'm having a issue where the console.log() statement executes before the .map() function. So it logs out a empty array. I tested by putting the log inside the map, it prints Hey! I'm having a issue where the console.log() statement executes before the .map() function. So it logs out a empty array. I tested by putting the log inside the map, it prints](https://preview.redd.it/hey-im-having-a-issue-where-the-statement-executes-before-v0-8t1p24kt1yna1.png?auto=webp&s=d75fd1e1d48bb5066aaa5d5c768726bd3b9a4761)
Hey! I'm having a issue where the console.log() statement executes before the .map() function. So it logs out a empty array. I tested by putting the log inside the map, it prints
![javascript - Console displaying information of 4 objects when there is only 1 object in my array - Stack Overflow javascript - Console displaying information of 4 objects when there is only 1 object in my array - Stack Overflow](https://i.stack.imgur.com/oJO58.png)
javascript - Console displaying information of 4 objects when there is only 1 object in my array - Stack Overflow
JavaScript Arrays In-Depth. A breakdown of the core concepts of… | by Kumar Kalyan | JavaScript in Plain English
![javascript - Confused console.log is outputting a sorted array before the sort operates on it - Stack Overflow javascript - Confused console.log is outputting a sorted array before the sort operates on it - Stack Overflow](https://i.stack.imgur.com/c7bxZ.jpg)