Friday, October 25, 2019

Explaining the difference between Closures & OOP to a 10 years old kid

As we explained before about closures is to nest a global thing and make it not accessible to everyone but you cannot access it without the help of others,but that takes a lot of space from the house so what will we do?.
What if we wanted to nest the candy from everyone and make it more secret,let's say that there is not enough space in the house so we create something called (OOP) which uses  the help of others to have the candy and return it to you, and sort it to you in attributes depending on the flavour and it will be yours only without taking much space.

No comments:

Post a Comment