Added value to the code example

So that it is more consistent with the tutorial text.
pull/2491/head^2
Pier Bover 7 years ago committed by GitHub
parent 67bd3a56fc
commit faf7a6de38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,8 +1,8 @@
<script>
let numbers = [1, 2, 3, 4];
function addNumber() {
numbers = [...numbers, numbers.length + 1];
function addNumber(value) {
numbers = [...numbers, value];
}
$: sum = numbers.reduce((t, n) => t + n, 0);

Loading…
Cancel
Save