We define a function outside of the main function so how is it that we use it inside the main function? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

We define a function outside of the main function so how is it that we use it inside the main function?

Hello guys. The question is complete in the title but i have another thing to ask too. Is it possible to define a function inside another function so that it can only be called inside of that?

23rd Oct 2019, 9:12 AM
Emad
2 Answers
+ 2
Ok im sorry i thought it would kinda be concluded
23rd Oct 2019, 9:59 AM
Emad
+ 1
what language ? most of them no. javascript can have a nested function. other than that, maybe by using class and private method
23rd Oct 2019, 9:20 AM
Taste
Taste - avatar