Answers for "global scope js"

29

javascript define global variable

window.myGlobalVariable = "I am totally a global Var"; //define a global variable
var myOtherGlobalVariable="I too am global as long as I'm outside a function";
Posted by: Guest on August-02-2019
1

global scope js

const color = 'blue'

const returnSkyColor = () => {
  return color; // blue 
};

console.log(returnSkyColor()); // blue
Posted by: Guest on July-05-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language