Monday, August 27, 2012

Javascript re-use variable in other function

How can I re-use the variable y in function two? I have read about this topic but what is the simplest solution?



function one(){
y = 2
}

function two(){
x = y * 2
}​






Rating: 2 out of 5 based on 4 ratings



The post Javascript re-use variable in other function appeared first on Javascript ASK.






via Javascript ASK http://javascriptask.phpfogapp.com/javascript-re-use-variable-in-other-function.html

No comments:

Post a Comment