0

JavaScript variable and function

I do not fully understand when a variable is outside a function and when its need to be inside a function.🤔 Any help will be appericiated!

21st Aug 2018, 11:23 AM
🌴Vincent Berger🌴
🌴Vincent Berger🌴 - avatar
1 Odpowiedź
+ 4
inside function means Local variable, this variable cannot carry value outside that mean you can use same name variable outside of the function for different propose. variable outside the function is Global variable...
21st Aug 2018, 11:37 AM
Rameshwor Nepal
Rameshwor Nepal - avatar