QuestenaUn entraînement qui indique quoi revoir ensuite
Question 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 elementsBonne réponse
  4. It returns an array of removed elementsBonne réponse

Explication

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.

Continuer avec ce test

Commencer l’entraînement
Question 45: Which statements about Array splice are true? Select all… · JavaScript Fundamentals · Questena