1
respuesta

Mira mi código

¿Cuál sería la salida?

<body>
    <h3>PROGRAMA: Seleccionar heroes</h3>
    <script>
        function saltarLinea()
        {
            document.write("<br>");
        }
        function imprimir(frase)
        {
            document.write(frase);
            saltarLinea();
        }

        var heroes = ["Thor", "Batman", "Mujer Maravilla", "Superman"];

        for(var nombre = 0; nombre < heroes.length; nombre++)
        {
            if(heroes[nombre] != "Superman"){
                alert(heroes[nombre]);
            }
        }
        alert("FIN");

    </script>
</body>
1 respuesta

Hola Cristhian, cómo estas?

Gracias por compartir tu código, felicitaciones.

Si tienes alguna duda sobre el contenido de los cursos, estaremos aquí para ayudarte.

Si este post te ayudó, por favor, marca como solucionado ✓. Continúa con tus estudios