Merge pull request #235 from amid11/patch-1

Fix for replacing the middle item in an Array
This commit is contained in:
Ilya Kantor 2017-10-07 17:04:53 +03:00 committed by GitHub
commit 61f92a158c

View file

@ -3,7 +3,7 @@
```js run
let styles = ["Jazz", "Blues"];
styles.push("Rock-n-Roll");
styles[(styles.length + 1) / 2] = "Classics";
styles[Math.floor((styles.length - 1) / 2)] = "Classics";
alert( styles.shift() );
styles.unshift("Rap", "Reggie");
```