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

284
Views
¿Qué significan los corchetes después de la llamada a la función?

Estoy tratando de entender el propósito del [0] en la llamada de función que encontré y ¿qué valor se devuelve a x?

 x = my_function(var1, var2)[0]; function my_function(v1, v2){ var v3, v4 v3 = v1 * 3; v4 = v2 * 7; return( [v3, v4] ); }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Significan que la función devuelve una matriz y solo necesita el primer elemento de esa matriz.

return no es una función, por cierto. No necesitas los paréntesis.

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!