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

112
Vistas
How am I supposed to check if the cells of the array are equal?

We need to be able to test if two cells are the same. Complete the function named same that accepts two cells and returns a Boolean indicating if the two cells are the same.

function same([x, y],[j, k]) {
a = same.this [x,y],[j,k];
a.forEach(function(sem){
console.log(sem());
})
 } 

Error Message: TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))

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

0

You can try this, you can change the 3 equal signs (===) to 2(==). In case of comparing string and integer values like 2 and "2".

function same([x, y],[j, k]) {
  if(x===j && y===k){
    console.log(true);
  }
  else{
    console.log(false);
  }
}
same(["a","b"],["c","b"])
same(["a","b"],["a","b"])

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