title: How do I create a globally accessible variable?
body: <p>I'm trying to make a variable thats can work anywhere, and just not in one function.</p>
  
  <p>How do i do this? I've searched for like 1 hour now and i can't find it :(</p>
  
  <p>I tried this</p>
  
  <pre><code>noneTxt = document.innerHTML="Nothing is playing!";
  
  function plinf() {
      if (myAudio.paused) {
          myAudio.play();
      }
      else {
      myAudio.pause();
      document.getElementById('message').innerHTML=noneTxt;
      }
  }
  </code></pre>
  
  <p>But it only works if I put the variable inside the function with var prefix...
  So how can i make it kinda global? :/</p>