The Team List
JavaScript
10 pts
The Team List
Create a const array called team with the players "Abel", "Yonas" and "Ruta". Then change it without assigning a new array:
- add
"Senait"at the end withpush(), - replace the first player with
"Selam".
Finally print the array and the number of players. Expected output:
[ "Selam", "Yonas", "Ruta", "Senait" ] Players: 4
Checklist
- Create the
constarrayteamwith three players and never assign it again. - Add Senait with
push()and replace the first player with Selam. - Print the array and the number of players.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
