QuestenaՎարժանք, որը ցույց է տալիս՝ ինչ կրկնել հաջորդիվ
Հարց 55

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

  1. true
  2. falseՃիշտ պատասխան
  3. undefined
  4. It skips returning a value

Բացատրություն

With no elements, there cannot be an element whose callback result is truthy, so some returns false. Returning true would confuse the existential rule of some with the vacuous all-elements rule used by every.

Շարունակեք այս թեստով

Սկսել վարժանքը
Հարց 55: What does an empty array return from some when given any… · JavaScript Fundamentals · Questena