Challenge: Practicing `pop` & `shift`
Tarea
Swipe to start coding
- Use the
popmethod to remove the last element of theitemsarray. - Use a
console.logstatement to print the array after usingpop, in the format:After pop: [ element1, element2, ... ]. - Use the
shiftmethod to remove the first element of the array. - Use a
console.logstatement to print the array after usingshift, in the format:After shift: [ element1, element2, ... ].
Note
The
pop()method should be used before using theshift()method.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 62
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Genial!
Completion tasa mejorada a 1.33
Challenge: Practicing `pop` & `shift`
Desliza para mostrar el menú
Tarea
Swipe to start coding
- Use the
popmethod to remove the last element of theitemsarray. - Use a
console.logstatement to print the array after usingpop, in the format:After pop: [ element1, element2, ... ]. - Use the
shiftmethod to remove the first element of the array. - Use a
console.logstatement to print the array after usingshift, in the format:After shift: [ element1, element2, ... ].
Note
The
pop()method should be used before using theshift()method.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 62
single