Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

167
Views
No se pueden establecer propiedades de nulo (estableciendo 'textContent')

Recientemente comencé a codificar.

Quería hacer un sitio donde se reprodujera el efecto de escritura.

Seguí un tutorial, pero al abrir la consola de Chrome encuentro este error: "No se pueden establecer las propiedades de nulo (estableciendo 'textContent')"

Si trato de ejecutarlo en codepen, funciona, pero si uso mi editor de texto y ejecuto el código en Chrome, no funciona.

También os dejo el enlace del código: https://codepen.io/andreab16/pen/KKQegQN

 var texts = ["designer", "F1 enthusiast", "guy", "human"]; let count = 0; let index = 0; let currentText = ""; let letter = ""; (function type() { if (count === texts.length) { count = 0; } currentText = texts[count]; letter = currentText.slice(0, ++index); document.querySelector(".typing").textContent = letter; console.log("ok"); if (letter.length === currentText.length) { count++; index = 0; } setTimeout(type, 250); })();

Muchas gracias a todos

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!