![Can anybody please explain why console.log works in first one but doesn't work in second one ? : r/learnjavascript Can anybody please explain why console.log works in first one but doesn't work in second one ? : r/learnjavascript](https://preview.redd.it/can-anybody-please-explain-why-works-in-first-one-but-v0-opudf90lz37b1.jpg?width=675&format=pjpg&auto=webp&s=469e5c9abbef59d8d163e3392840446468d65ae4)
Can anybody please explain why console.log works in first one but doesn't work in second one ? : r/learnjavascript
![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://i.redd.it/8t1p24kt1yna1.png)
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
![Processing Arrays and Functions with Return Values #3 | Unit 5 Online Professional Learning Course - Code.org Processing Arrays and Functions with Return Values #3 | Unit 5 Online Professional Learning Course - Code.org](https://images.code.org/632c3875d47bb6fd54130b9874c44552-image-1447778563981.gif)
Processing Arrays and Functions with Return Values #3 | Unit 5 Online Professional Learning Course - Code.org
![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 - How do I restore console.log() function that has been disabled by a website? - Stack Overflow javascript - How do I restore console.log() function that has been disabled by a website? - Stack Overflow](https://i.stack.imgur.com/1QcRL.png)