let object = { YoutubeChannel: { name: 'Comicverse', location: 'India,Madhya Pradesh', Domains: { Videos: ['Doctor doom final plan', 'Marvel is faling'], Shorts: ['This is crazy', "Who will appear in Marvel's doomsday"], } } }; (function() { console.log("Hey! this is an immediately invoked function!!"); } )();
- I asked AI, and it told me something about parsing and all. That is how JS considers that the function is still a part of the object and tries to execute it.
- But my concern is that with the use of curly braces, I have explicitly defined their domain.
- Why is it that it still needs the semicolon between the object literal and the Immediately Invoked Function Expression
P.S. If you have any suggestions regarding how I can improve the way I ask questions, how to format them, etc., please let me know... :-)