0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 01:11:24 +01:00

take code block out of blockquote

This commit is contained in:
Richard Harris 2019-06-09 16:34:54 -04:00
parent 44489c9ccb
commit 9754f2a817

View File

@ -13,7 +13,7 @@ function addNumber() {
}
```
But there's a more *idiomatic* solution:
But there's a more idiomatic solution:
```js
function addNumber() {
@ -23,10 +23,10 @@ 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;
> }
> ```
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;
}
```