Two ways for JavaScript to declare global variables

From , 5 Years ago, written in JavaScript, viewed 195 times.
URL https://pastebin.vip/view/077fd57e
  1. var oneVariable;
  2.  
  3. function setVariable(){
  4.     oneVariable = "Variable set from within a function!";
  5. }
  6.  
  7. function getVariable(){
  8.     alert(oneVariable); // Outputs "Variable set from within a function!"
  9. }
  10.  
  11.  
  12. //javascript/4164

Reply to "Two ways for JavaScript to declare global variables"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website