0

Help me to fix my code

function showPreloader() { //complete the function function myFynction(); alert("loading"); { } //call the function ?????

30th Aug 2021, 11:24 PM
Юра ŠšŃƒŠ±ŠøŠ½ŠµŃ†ŃŒ
5 Answers
+ 2
I might have helped if i knew what to fix.
30th Aug 2021, 11:53 PM
Abhay
Abhay - avatar
+ 2
I know you can call a function inside a function, but I've never seen people define a function inside a function
31st Aug 2021, 3:56 AM
Tim
Tim - avatar
+ 1
i am a little confused myself. maybe this is what you are looking for Юра ŠšŃƒŠ±ŠøŠ½ŠµŃ†ŃŒ ? function showPreloader() { //complete the function } // i dont think you need this function unless you were attempting nested functions… function myFunction(){ alert("loading"); } //call the function myFunction();
31st Aug 2021, 12:03 AM
you are smart. you are brave.
you are smart. you are brave. - avatar
+ 1
Nick i think closure functions is one way to utilize a function within a function. from my understanding it can create like a closed environment. corey schafer has a video on it which provides a good explanation.
31st Aug 2021, 5:10 AM
you are smart. you are brave.
you are smart. you are brave. - avatar
0
Юра ŠšŃƒŠ±ŠøŠ½ŠµŃ†ŃŒ it's hard for people to help if you don't tell them what you're trying to do. Here are some recommendations on what information you should provide when asking for help: https://www.sololearn.com/discuss/333866/?ref=app
31st Aug 2021, 12:46 AM
Simon Sauter
Simon Sauter - avatar