Skip to content

nickakey/GetClosureOnClosures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Get Closure on closures!

Nervous about being asked about closures or IIFEs at a job interview?

Don't be nervous, be practiced! With these 6 Closure Problems.

Gif of closure quote from Friends

Why?

Closures and IIFEs are TRICKY.

Instead of reading about them once, you can quiz yourself over and over again with this problem set.

Currently, it focuses on IIFE applications, but more may be added soon. (Contributions welcome!)

Usage

Copy all the problems from main.js into your IDE with a good terminal OR a tool like Javascript Replit

Then, one problem at a time - make a prediction on WHAT you think will be logged by the function.

After you make a prediction, comment out the function call, and run the code!

If your prediction was correct - great! Next problem.

If your prediction was incorrect - STOP, learn more about closures, and don't continue until you are able to explain WHY the code does what does.

Contributing

Do you have some Closure problems that are unaddressed by this problem set?

Please make a Pull Request and I'll be happy to add :)

Shoutouts

Shoutout to Jacob Ward for the seventh question in the list. Tricky! https://jacobward.io/post/presenting-javascript-interview-question/