Passing variable between functions in JavaScript
<p>How can I pass the variable <code>word1</code> in the first function to the second function in pure JavaScript?</p>

<pre><code>function functionOne()
{
    var word1 = "dog" ;
}

function functionTwo()
{
    var word2= word1;
}
</code></pre>

<p>I've checked the other questions in stackoverflow on this subject but I didn't get a simple answer.</p>
