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

143
Vistas
JavaScript sorting of an RGB array

This is the task:

Colors have to be ordered in such way:

  • Higher Red value first; if the same then:

  • Higher Green value first; if the same then:

  • Higher Blue value first; if the same then on the same position

The task is as follows. I don't know how to do it or what it is supposed to look like. Ideally, the function should take an array of colors in HEX. E.g:

  [

    "#FF1100",

    "#44FF00",

    "#1900FF",

    "#E02500",

    "#54E600",

    "#0206DE",

   ]

And then it returned the sorted array as in the task. How can I do it? I am stuck.

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

0

Simple sort with reverse should work:

yourData.sort().reverse()

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