Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

160
Vistas
Error in JS "Uncaught TypeError: Cannot set properties of null (setting 'innerHTML') at call.html:10:58"

I am new to JavaScript I am trying to print an array using a function document.getElementById I am getting an error Uncaught TypeError: Cannot set properties of null (setting 'innerHTML') at call.html:10:58

<!DOCTYPE html>
<html>
    <head>
        <title>My information</title>
        <body>
            <h1>My name is Luffy</h1>
            <p>I am a software developer</p>
            <script>
            const programmingLanguage = ["Python", "Java","C"];
                document.getElementById("program").innerHTML=programmingLanguage;
            </script>
        </body>
    </head>
</html>

please help me where did i go wrong

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The problem is that, you are trying to get an element which has the id program, but there is no element which has the id as program.

You can create an element with id program. this will resolve the error.

<!DOCTYPE html>
<html>
    <head>
        <title>My information</title>
        <body>
            <h1>My name is Luffy</h1>
            <p>I am a software developer</p>
            
            <p id="program"></p>
            
            <script>
            const programmingLanguage = ["Python", "Java","C"];
                document.getElementById("program").innerHTML=programmingLanguage;
            </script>
        </body>
    </head>
</html>

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda