Add implementation for the given tutorial example

pull/7738/head
Karsten 7 6 years ago committed by GitHub
parent dcfb56a791
commit fc081bea1b

@ -24,3 +24,9 @@ function addNumber() {
You can use similar patterns to replace `pop`, `shift`, `unshift` and `splice`.
> Assignments to *properties* of arrays and objects — e.g. `obj.foo += 1` or `array[i] = x` — work the same way as assignments to the values themselves.
>
> ```js
> function addNumber() {
> numbers[numbers.length] = numbers.length + 1;
> }
> ```

Loading…
Cancel
Save