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

131
Vistas
Typescript: reverse by return

Javascripts/Typescripts reverse does reverse the elements of an array.

Is there a function that does this not to the array but returns a new array with reversed elements??

What it is:

let ary : number [] = [2,4,6];
ary.reverse ();
console.log (ary);    // output: 6,4,2

What I want:

let ary : number [] = [2,4,6];
ary.reverse ();
console.log (ary);              // output: 2,4,6
console.log (ary.reverse ());   // output: 6,4,2

Sure, it is not a bit effort to do it by myself but I would prefer an existing function.

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