I know this must have been asked before as it is a very simple question, however I cannot get a clear answer.
How do I get the value of a variable from a function in to another function?
var x = 0;
function firstFunc(){
x = 1
}
function secondFunc(){
alert(x);
}
Thank you