Answers for "variable declaration in javascript function"

33

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
12

declare function javascript

function myFunction(var1, var2) {
  return var1 * var2;
}
Posted by: Guest on February-05-2020
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 "variable declaration in javascript function"

Code answers related to "Javascript"

Browse Popular Code Answers by Language