Let's assume that you want to declare a function inside another function so that you can call them sequentially as a().b()
.
Example:
javascriptlet erik = () => { let fn = {} fn.age = () => 31 fn.loc = () => 'Barcelona' return fn }
Then:
javascripterik().age() // 31 erik().loc() // 'Barcelona'
Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.