Challenge: Pushing Elements to an Array
Tâche
Swipe to start coding
- You have an array named
shoppingListthat contains the following three elements:Milk,Eggs, andBread. - Use the
push()method to add the following two elements to the array:Butter,Cheese. (Please add these elements in the required order) - Use a
console.log()statement to output the entire array in the format:After: [element1, element2, ...].
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 60
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Génial!
Completion taux amélioré à 1.33
Challenge: Pushing Elements to an Array
Glissez pour afficher le menu
Tâche
Swipe to start coding
- You have an array named
shoppingListthat contains the following three elements:Milk,Eggs, andBread. - Use the
push()method to add the following two elements to the array:Butter,Cheese. (Please add these elements in the required order) - Use a
console.log()statement to output the entire array in the format:After: [element1, element2, ...].
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 60
single