Parentheses cause a function to invoke. So putting the parens after the function expression causes it to run. This structure is called an Immediately Invoked Function Expressions: th-cam.com/video/w71IVgfsOL0/w-d-xo.html
@@AllThingsJavaScript so with aFun.memoCache the 5 gonna be the key for the object and the value gonna be the object with key parameter and value 5. This is kinda wrapping object inside object?
i would like to say thank you. in my opinion a hard concept to understand, yet explained clearly!
Thanks for explaining this complex concept of memorization along with code. Appreciated!
thanks, good tutorial
Why is the memoized fibonacci function executed, aka its syntax ends with "( )" after the closed curly bracket ?
Parentheses cause a function to invoke. So putting the parens after the function expression causes it to run. This structure is called an Immediately Invoked Function Expressions: th-cam.com/video/w71IVgfsOL0/w-d-xo.html
why did you modify the result object with the .parameter extension?
What I did was I added the parameter value to the result object and assigned it to the parameter property. Does that help?
www.w3schools.com/js/js_object_properties.asp it may be useful : )
@@AllThingsJavaScript so with aFun.memoCache the 5 gonna be the key for the object and the value gonna be the object with key parameter and value 5. This is kinda wrapping object inside object?
@@MrMarkgyuro Since functions are objects in JavaScript, this is possible.
you are amazinG! very much thank U!!
1.5 speed to emulate normal speed