I'm trying to pass a variable from one function to another. I thought this would work but I get undefined.
function launch(){
amount();
finalize(theAmount);
}
function amount(){
var theAmount = prompt('How much?');
return theAmount;
}
function finalize(theAmount){
alert(theAmount);
}
launch();