Skip to content

Commit e3e32d6

Browse files
update
1 parent 81b4945 commit e3e32d6

File tree

1 file changed

+4
-4
lines changed
  • 1-js/04-object-basics/09-object-toprimitive

1 file changed

+4
-4
lines changed

1-js/04-object-basics/09-object-toprimitive/article.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ Avem două scopuri:
2828
2. Conversia numerică are loc atunci când scădem obiecte sau aplicăm funcții matematice. De exemplu, obiectele de tip `Date` (ce vor fi studiate în capitolul <info:date>) pot fi scăzute, iar rezultatul `date1 - date2` este diferența de timp dintre cele două date.
2929
3. În ceea ce privește conversia șirului - se întâmplă de obicei atunci când afișăm un obiect precum `alert(obj)` și în contexte similare.
3030

31-
We can fine-tune string and numeric conversion, using special object methods.
31+
Putem regla fin șirurile și conversia numerică, folosind metode speciale de obiecte.
3232

33-
There are three variants of type conversion, that happen in various situations.
33+
Există trei variante de conversie de tip, care se întâmplă în diferite situații.
3434

35-
They're called "hints", as described in the [specification](https://tc39.github.io/ecma262/#sec-toprimitive):
35+
Se numesc "indicii", așa cum sunt descrise în [specificația](https://tc39.github.io/ecma262/#sec-toprimitive):
3636

3737
`"string"`
3838
: Pentru o conversie obiect-la-șir, atunci când efectuăm o operație asupra unui obiect care se așteaptă la un șir, cum ar fi `alert`:
@@ -120,7 +120,7 @@ let user = {
120120
}
121121
};
122122

123-
// demo conversie:
123+
// conversie demo:
124124
alert(user); // indiciu: string -> {name: "John"}
125125
alert(+user); // indiciu: number -> 1000
126126
alert(user + 500); // indiciu: default -> 1500

0 commit comments

Comments
 (0)