QuestenaPráctica que te muestra qué repasar después
Pregunta 56

What does an empty array return from every when given any ordinary predicate callback?

  1. false
  2. undefined
  3. trueRespuesta correcta
  4. It throws a TypeError

Explicación

every returns true for an empty array because no tested element violates the predicate, an instance of vacuous truth. Returning false would incorrectly require the array to contain at least one passing element.

Continúa con este test

Empezar la práctica
Pregunta 56: What does an empty array return from every when given any… · JavaScript Fundamentals · Questena