I am a beginner in JavaScript and wanted to ask the following: I have two simple functions and was wondering if there is any way to pass a variable value from one function to an
Adding to @pranay-rana's list:
Third way is:
function passFromValue(){ var x = 15; return x; } function passToValue() { var y = passFromValue(); console.log(y);//15 } passToValue();