educative.io

Why does it console.log "two" as well on the question 4 of the conditionals quiz?

On the question 4 of Conditionals Quiz of the course javaScript in detail, the right answer says the following code will console “Start”, “two” and “End” and I’d like to understand how JavaScript reads this code that makes it possible to console the word “two”:

var number = 20;
console.log(“Start”);
if(true)
if(true)
if(false)
if(true)
console.log(“here”);
else
console.log(“one”)
else
console.log(“two”)
else
console.log(“three”)
else
console.log(“four”)

console.log(‘End’);


Course: JavaScript in Detail: From Beginner to Advanced - Learn Interactively
Lesson: Quiz on Conditionals - JavaScript in Detail: From Beginner to Advanced