This commit is contained in:
Ilya Kantor 2016-07-21 17:05:55 +03:00
parent 1bffa43db4
commit 057783d216
373 changed files with 203 additions and 190 deletions

View file

@ -1,24 +0,0 @@
importance: 5
---
# Array operations.
Let's try 5 array operations.
1. Create an array `styles` with items "Jazz" and "Blues".
2. Append "Rock-n-Roll" to the end.
3. Replace the value in the middle by "Classics". Your code for finding the middle value should work for any arrays with odd length.
4. Strip off the first value of the array and show it.
5. Prepend `Rap` and `Reggie` to the array.
The array in the process:
```js no-beautify
Jazz, Blues
Jazz, Bues, Rock-n-Roll
Jazz, Classics, Rock-n-Roll
Classics, Rock-n-Roll
Rap, Reggie, Classics, Rock-n-Roll
```