QuestenaPráctica que te muestra qué repasar después
Pregunta 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 elementsRespuesta correcta
  4. It returns an array of removed elementsRespuesta correcta

Explicación

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.

Continúa con este test

Empezar la práctica