File tree Expand file tree Collapse file tree
1-js/05-data-types/01-primitives-methods Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ roma.sayHi(); // Привет, дружище!
5959``` js run
6060let str = " Привет" ;
6161
62- alert (str .toUpperCase ()); // ПРИВЕТ
62+ alert ( str .toUpperCase () ); // ПРИВЕТ
6363```
6464
6565Легко, правда? Вот, что на самом деле происходит в ` str.toUpperCase() ` :
@@ -77,7 +77,7 @@ alert(str.toUpperCase()); // ПРИВЕТ
7777``` js run
7878let n = 1.23456 ;
7979
80- alert (n .toFixed (2 )); // 1.23
80+ alert ( n .toFixed (2 ) ); // 1.23
8181```
8282
8383Более подробно с различными свойствами и методами мы познакомимся в главах < info:number > и < info:string > .
@@ -91,9 +91,9 @@ alert(n.toFixed(2)); // 1.23
9191Например:
9292
9393``` js run
94- alert (typeof 1 ); // "число"
94+ alert ( typeof 1 ); // "число"
9595
96- alert (typeof new Number (1 )); // "объект"!
96+ alert ( typeof new Number (1 ) ); // "объект"!
9797```
9898
9999И так как ` zero ` - это объект, модальное окно выведется на экран.
@@ -103,7 +103,7 @@ let zero = new Number(0);
103103
104104if (zero) {
105105 // zero возвращает "true", так как является объектом
106- alert (" zero имеет «истинное» значение?!?" );
106+ alert ( " zero имеет «истинное» значение?!?" );
107107}
108108```
109109
You can’t perform that action at this time.
0 commit comments