showing results for - "change variable inside function js"
Cristóbal
01 Sep 2016
1var a = 10;
2
3myFunction();
4
5function myFunction(){
6   a = 20;
7}
8
9alert("Value of 'a' outside the function " + a); //outputs 20
10