What are Closures in JavaScript? Naveen Kamath on December 11, 2021 Hello Readers, Keep Reading this Blog to know more about Closures .... Lets Look at this Example: 1. function x(){ 2. var a=14; 3. fu... Read full post Submit Preview Dismiss Collapse Expand Adithya Adithya Adithya Follow Learning and sharing!⚡💻 Location Coimbatore, India Joined May 31, 2021 • Dec 11 '21 Dropdown menu Copy link Hide Short and clear blog buddy!👏 Collapse Expand Naveen Kamath Naveen Kamath Naveen Kamath Follow Email naveen.kamath002@gmail.com Location India Joined Oct 2, 2020 • Dec 11 '21 Dropdown menu Copy link Hide Thank you :) Collapse Expand Ekanem Ekanem Ekanem Follow Just passing thru Location Lagos Work Frontend Developer at Startup Studio Joined Mar 13, 2019 • Dec 12 '21 • Edited on Dec 12 • Edited Dropdown menu Copy link Hide Thanks for the article. I have a question though. Why was the function returned when y instead of y() was called? Collapse Expand Naveen Kamath Naveen Kamath Naveen Kamath Follow Email naveen.kamath002@gmail.com Location India Joined Oct 2, 2020 • Dec 12 '21 Dropdown menu Copy link Hide Because I wanted to return the function y and not to invoke or call it . y-->returning function y. y()--> Invoking or calling the function. Collapse Expand Ekanem Ekanem Ekanem Follow Just passing thru Location Lagos Work Frontend Developer at Startup Studio Joined Mar 13, 2019 • Dec 12 '21 Dropdown menu Copy link Hide Thank you. I understand better now Naveen Kamath Naveen Kamath Naveen Kamath Follow Email naveen.kamath002@gmail.com Location India Joined Oct 2, 2020 • Dec 12 '21 Dropdown menu Copy link Hide Glad you liked it :) Collapse Expand Andrew Baisden Andrew Baisden Andrew Baisden Follow Full-Stack Engineer | React, Next.js, TypeScript, Node.js | AI-Assisted Engineering Location London, UK Education Bachelor Degree Computer Science Work Software Developer Joined Feb 11, 2020 • Dec 11 '21 Dropdown menu Copy link Hide Nice and concise 👍 Collapse Expand Naveen Kamath Naveen Kamath Naveen Kamath Follow Email naveen.kamath002@gmail.com Location India Joined Oct 2, 2020 • Dec 26 '21 Dropdown menu Copy link Hide Thank you :) Collapse Expand Jam Straw Jam Straw Jam Straw Follow I am a content writer who loves to write about updated technical reviews, apps, software, tools, and gadget. Location Minsk Education MA Work Writer at 10Techdesign Joined Dec 14, 2021 • Dec 14 '21 Dropdown menu Copy link Hide Nice Information. Collapse Expand Naveen Kamath Naveen Kamath Naveen Kamath Follow Email naveen.kamath002@gmail.com Location India Joined Oct 2, 2020 • Dec 26 '21 Dropdown menu Copy link Hide Ty and Have a Great Day :) Collapse Expand Jesús Ramírez Jesús Ramírez Jesús Ramírez Follow Web Developer Location Maturín, Monagas. Venezuela Joined Dec 11, 2021 • Dec 15 '21 Dropdown menu Copy link Hide Clearest impossible! Collapse Expand Liam Emma Liam Emma Liam Emma Follow Joined Dec 1, 2021 • Dec 15 '21 Dropdown menu Copy link Hide Good Information thanks Collapse Expand Naveen Kamath Naveen Kamath Naveen Kamath Follow Email naveen.kamath002@gmail.com Location India Joined Oct 2, 2020 • Dec 26 '21 • Edited on Dec 26 • Edited Dropdown menu Copy link Hide Glad you Liked it :) Collapse Expand lozio lozio lozio Follow Joined Feb 21, 2018 • Sep 23 '22 Dropdown menu Copy link Hide Thanks,it helps me a lot. Can I translate it into Chinese and share it to more people on juejin.im ? Collapse Expand Naveen Kamath Naveen Kamath Naveen Kamath Follow Email naveen.kamath002@gmail.com Location India Joined Oct 2, 2020 • Nov 23 '22 Dropdown menu Copy link Hide ok Code of Conduct • Report abuse
Short and clear blog buddy!👏
Thank you :)
Thanks for the article. I have a question though. Why was the function returned when
yinstead ofy()was called?Because I wanted to return the function y and not to invoke or call it .
y-->returning function y.
y()--> Invoking or calling the function.
Thank you. I understand better now
Glad you liked it :)
Nice and concise 👍
Thank you :)
Nice Information.
Ty and Have a Great Day :)
Clearest impossible!
Good Information thanks
Glad you Liked it :)
Thanks,it helps me a lot. Can I translate it into Chinese and share it to more people on juejin.im ?
ok