Untitled

 avatar
unknown
plain_text
3 years ago
412 B
1
Indexable
// Declare the myGlobal variable below this line
let oopsGlobal;
let myGlobal;

function fun1() {
  // Assign 5 to oopsGlobal Here
  oopsGlobal = 5;
  myGlobal = 10;
}

// Only change code above this line

function fun2() {
  var output = "";
  if (typeof !myGlobal) {
    output += "myGlobal: " + myGlobal;
  }
  if (typeof !oopsGlobal) {
    output += " oopsGlobal: " + oopsGlobal;
  }
  console.log(output);
}
Editor is loading...