Closure confusion

Here in the console, I am getting help as a closure but it is showing undefined in the console. If it is undefined then how it is updating my dom??

Buenas Mizanmahi, siendo alguien nuevo en Javascript, en la línea 23 tienes un paréntesis de más y se te ha olvidado ponerle un símbolo de ;

1 Like

I don’t understand your language, can you please tell me in English?

Of course.

Good Mizanmahi, on line 23 you have an extra parenthesis and you forgot to put a symbol of ;

On line 23 if I don’t use parenthesis after helpMaker function then it will print only helpMaker function’s declaration but instead, I want to print here what is its returning and that is also a function and in that function what is the value of help

Correct, it was my mistake,
but on line 23 and line 36 you forgot to close the instruction with a semicolon.

Line 23->console.dir(helperMaker());
Line 36->document.getElementById(item.ide ).onfocus = helperMaker(item.help);