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

174
Views
TypeError TypeError: no se pueden leer las propiedades de undefined (leyendo 'longitud') para el bot de Twitter
// function to generate a random tweet tweet function ranDom (arr) { var index = Math.floor(Math.random()*arr.length); return arr[index]; };

Este es el codigo usado

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Funciona bien aquí:

 function ranDom (arr) { return arr[Math.floor(Math.random()*arr.length)]; }; var items = [254, 45, 212, 365, 2543]; console.log(ranDom(items));

about 4 years ago · Juan Pablo Isaza Report

0

En general, puede agregar esta línea al comienzo de su función

 if (arr === undefined){ return DEFAULT_VALUE; \\define your default value for this case.. }

para manejar este caso.

Pero debe investigar por qué su arr no está definido desde la llamada a la función.

about 4 years ago · Juan Pablo Isaza Report
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!