Skip to content

Commit 7d1a5f1

Browse files
authored
Merge pull request #222 from sellorm/master
Fixes two minor issues with basics.md
2 parents e3b21ab + 743fa4a commit 7d1a5f1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

_en/basics.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ put values separated by commas inside `[]` to create an [array](#g:array),
153153
and use `for...of` to loop over the values in that array.
154154
Note that we use `let` rather than the older `var` and `of` and not `in`:
155155
the latter returns the indexes of the collection (e.g., 0, 1, 2),
156-
which has some traps for the unwary ((s:legacy-iteration)[#REF)).
156+
which has some traps for the unwary ([s:legacy-iteration](#REF)).
157157
Note also that indexing starts from 0 rather than 1,
158158
and that indentation is optional and for readability purposes only.
159159
This may be different from the language that you're used to.
@@ -187,14 +187,14 @@ for (let pair of values) {
187187
```
188188
{: title="basics/control-flow.js"}
189189
```text
190-
0 of type number is falsy
191-
1 of type number is truthy
190+
0 'of type' 'number' 'is falsy'
191+
1 'of type' 'number' 'is truthy'
192192
of type string is falsy
193193
text of type string is truthy
194-
undefined of type undefined is falsy
195-
null of type object is falsy
196-
of type object is truthy
197-
2,3 of type object is truthy
194+
undefined 'of type' 'undefined' 'is falsy'
195+
null 'of type' 'object' 'is falsy'
196+
[] 'of type' 'object' 'is truthy'
197+
[ 2, 3 ] 'of type' 'object' 'is truthy'
198198
```
199199

200200
This example shows that arrays are [heterogeneous](#g:heterogeneous),

0 commit comments

Comments
 (0)