![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
![Select an id value from a variable in JQuery - JavaScript - SitePoint Forums | Web Development & Design Community Select an id value from a variable in JQuery - JavaScript - SitePoint Forums | Web Development & Design Community](https://global.discourse-cdn.com/sitepoint/optimized/3X/9/a/9a84bc9dc044653a1d051b1edba39e42731a3f21_2_690x272.png)
Select an id value from a variable in JQuery - JavaScript - SitePoint Forums | Web Development & Design Community
![javascript - variable declared inside document ready not accessible in Jquery event handlers - Stack Overflow javascript - variable declared inside document ready not accessible in Jquery event handlers - Stack Overflow](https://i.stack.imgur.com/t3acw.png)