You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/02-first-steps/07-type-conversions/article.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ Numeric conversion rules:
70
70
|`undefined`|`NaN`|
71
71
|`null`|`0`|
72
72
|<code>true and false</code> |`1` and `0`|
73
-
|`string`| Whitespaces from the start and end are removed. If the remaining string is empty, the result is `0`. Otherwise, the number is "read" from the string. An error gives `NaN`. |
73
+
|`string`| Whitespaces (includes spaces, tabs `\t`, newlines `\n` etc.) from the start and end are removed. If the remaining string is empty, the result is `0`. Otherwise, the number is "read" from the string. An error gives `NaN`. |
74
74
75
75
Examples:
76
76
@@ -130,7 +130,7 @@ The conversion follows the rules:
130
130
|`undefined`|`NaN`|
131
131
|`null`|`0`|
132
132
|<code>true / false</code> | `1 / 0` |
133
-
| `string` | The string is read "as is", whitespaces from both sides are ignored. An empty string becomes `0`. An error gives `NaN`. |
133
+
| `string` | The string is read "as is", whitespaces (includes spaces, tabs `\t`, newlines `\n` etc.) from both sides are ignored. An empty string becomes `0`. An error gives `NaN`. |
134
134
135
135
**`Boolean Conversion`** -- Occurs in logical operations. Can be performed with `Boolean(value)`.
0 commit comments