The content variable even with a window in front of it, is not known to the second function that tries to use it. What am I doing wrong?
<button id="button" onclick="myFunction();">Button</div>
function MyFunction(){
window.content = "Hello";
chi();
}
function chi() {
var MyNewVar = content;
alert(MyNewVar);
}