Challenge: Practicing `pop` & `shift`
Завдання
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.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 62
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Чудово!
Completion показник покращився до 1.33
Challenge: Practicing `pop` & `shift`
Свайпніть щоб показати меню
Завдання
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.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 62
single