File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
1-js/02-first-steps/11-logical-operators/5-alert-and-or Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1- The answer : ` 3 ` .
1+ Răspunsul este : ` 3 `
22
33``` js run
44alert ( null || 2 && 3 || 4 );
55```
66
7- The precedence of AND ` && ` is higher than ` || ` , so it executes first.
7+ <!-- The precedence of AND `&&` is higher than `||`, so it executes first. -->
8+ Prioritatea lui ȘI ` && ` este mai mare decât cea a lui ORI ` || ` , așa că ` && ` executat primul.
89
9- The result of ` 2 && 3 = 3 ` , so the expression becomes :
10+ Rezultatul lui ` 2 && 3 = 3 ` , așa că expresia devine :
1011
1112```
1213null || 3 || 4
1314```
1415
15- Now the result is the first truthy value: ` 3 ` .
16-
16+ În acest caz, rezultatul este prima valoare truthy: ` 3 ` .
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ importance: 5
22
33---
44
5- # The result of OR AND OR
5+ # Rezultatul lui ORI ȘI ORI
66
7- What will the result be ?
7+ Care va fi rezultatul ?
88
99``` js
1010alert ( null || 2 && 3 || 4 );
You can’t perform that action at this time.
0 commit comments