Question from the Javascript - Fundamentals test

Print the number of countries in the array travel.

Medium

What does the following code display?

    const travel = ["guadeloupe", "brazil", "suriname"]; 
    let airplane = 1;
    for (var i =0; i <travel.length; i++) 
    {        
        airplane ++;
    }
    console.log(i);
Author: Vincent CotroStatus: Published(Update)Question passed 2644 times
Edit
4
Community Evaluations
developer avatar
Ludovic JIGAN
05/04/2024
Le scope Ă©tant global "i" est accessible en dehors de la boucle for
developer avatar
Auteur anonyme
05/06/2024
Le scope est global avec var mais pas avec let