+ 1

Can i link a var from function to another?

function vars

24th Jul 2017, 6:11 AM
khalil
khalil - avatar
2 Respuestas
+ 3
or use getters and setters, just like in java
24th Jul 2017, 6:20 AM
The Coding Sloth
The Coding Sloth - avatar
0
Directly not - you can not define variable in one function and use it in another - you have to use global variable - variable declared in scope above the functions.
24th Jul 2017, 6:17 AM
Ondřej Doněk
Ondřej Doněk - avatar