Answers for "change variable inside function js"

0

change variable inside function js

var a = 10;

myFunction();

function myFunction(){
   a = 20;
}

alert("Value of 'a' outside the function " + a); //outputs 20
Posted by: Guest on May-04-2021

Code answers related to "change variable inside function js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language