Quiz
In this lesson, we’ll take a quiz related to the concepts covered in the previous lesson.
1
What is the correct output of the following code?
var greeting = "Hello";
greeting = "Farewell";
for (var i = 0; i < 2; i++) {
var greeting = "Good morning";
}
console.log(greeting);
A)
Hello
B)
Good morning
C)
Farewell
Question 1 of 40 attempted
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy