What is the output of the following code?
let a = "apple"; function myFunct() { a = "book";/*from w w w . ja v a 2 s. co m*/ console.log(a); } function myFunct2() { let a = "tree"; myFunct(); console.log(a); } myFunct2(); console.log(a);
Click to view the answer
book tree book