JS Bin // source https://jsbin.com/diwekoc

Home   »   JS Bin // source https://jsbin.com/diwekoc




  
  
  JS Bin








var variable = 10;

function localScope() {
    var variable = 20;
    console.log('local variable: ' + variable);
}

localScope();

console.log('global variable: ' + variable);

Leave a Reply

Your email address will not be published. Required fields are marked *