What will be the output of the following program? Write the output in one line separated by spaces.
var fruit = "banana";
function favFruit() {
var fruit = "apple";
console.log(fruit);
}
console.log(fruit);
favFruit();
What will be the output of the following program? Write the output in one line separated by spaces.
var fruit = "banana";
function favFruit() {
var fruit = "apple";
console.log(fruit);
}
console.log(fruit);
favFruit();
Create a free account to access the full topic