Skip to content

Commit 5008a0e

Browse files
authored
Update article.md
1 parent 39d00b2 commit 5008a0e

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

1-js/02-first-steps/07-type-conversions/article.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -116,37 +116,37 @@ alert( Boolean(" ") ); // spații, de asemenea true (orice șir ne-gol este true
116116
```
117117
````
118118
119-
## Summary
120119
## Rezumat
121120
122-
The three most widely used type conversions are to string, to number, and to boolean.
121+
Cele mai des folosite tipuri de conversii sunt la șir, la numere, și la boolean
123122
124-
**`String Conversion`** -- Occurs when we output something. Can be performed with `String(value)`. The conversion to string is usually obvious for primitive values.
123+
**`Conversia Șirului`** -- Apare când afișăm ceva. Poate fi executată cu `String(value)`. Aceasta conversia la șir este destul de evidentă pentru pentru valori primitive.
125124
126-
**`Numeric Conversion`** -- Occurs in math operations. Can be performed with `Number(value)`.
125+
**`Conversia Numerică`** -- Apare în operațiile matematica. Poate fi executată cu `Number(value)`.
127126
128-
The conversion follows the rules:
127+
Conversia urmează regulile:
129128
130-
| Value | Becomes... |
129+
| Valoare | Devine... |
131130
|-------|-------------|
132131
|`undefined`|`NaN`|
133132
|`null`|`0`|
134133
|<code>true&nbsp;/&nbsp;false</code> | `1 / 0` |
135-
| `string` | The string is read "as is", whitespaces from both sides are ignored. An empty string becomes `0`. An error gives `NaN`. |
134+
| `string` | Șirul este citit "așa cum este", spațiile goale din ambele părți sunt ignorate. Un șir gol devine `0`. O eroare devine `NaN`. |
136135
137-
**`Boolean Conversion`** -- Occurs in logical operations. Can be performed with `Boolean(value)`.
136+
**`Conversia Boolean`** -- Apare in operațiile logice. Poate fi executată cu `Boolean(value)`.
138137
139-
Follows the rules:
138+
Urmează regulile:
140139
141-
| Value | Becomes... |
140+
| Valoare | Devine... |
142141
|-------|-------------|
143142
|`0`, `null`, `undefined`, `NaN`, `""` |`false`|
144-
|any other value| `true` |
143+
|orice altă valoare| `true` |
144+
145145
146+
Majoritatea acestor reguli sunt ușor de înțeles și memorat. Excepțiile notabile unde oamenii fac greșeli de obicei sunt:
146147
147-
Most of these rules are easy to understand and memorize. The notable exceptions where people usually make mistakes are:
148+
- `undefined` este `NaN` ca și număr, nu `0`.
149+
- `"0"` și șirurile mono-spațiale ca și `" "` sunt adevărate ca și boolean.
148150
149-
- `undefined` is `NaN` as a number, not `0`.
150-
- `"0"` and space-only strings like `" "` are true as a boolean.
151+
Obiectele nu sunt acoperite aici. Ne vom întoarce la ele mai târziu in capitolul <info:object-toprimitive> ce este devotat exclusiv obiectelor dupa ce învățăm mai multe lucruri elementare despre JavaScript
151152
152-
Objects aren't covered here. We'll return to them later in the chapter <info:object-toprimitive> that is devoted exclusively to objects after we learn more basic things about JavaScript.

0 commit comments

Comments
 (0)