QuestenaПрактика, после которой понятно, что повторить
Вопрос 45

Which statements about Array splice are true? Select all that apply.

  1. It never changes its source array
  2. It always returns the final array length
  3. It can insert or remove elementsПравильный ответ
  4. It returns an array of removed elementsПравильный ответ

Объяснение

splice can insert, remove, or replace elements in the array it operates on, and its return value is an array of removed elements. Describing it as nonmutating transfers the behavior of slice to a different method.

Продолжить работу с тестом

Начать тренировку
Вопрос 45: Which statements about Array splice are true? Select all… · JavaScript Fundamentals · Questena