Skip to content

Commit 6e11c56

Browse files
Merge pull request #75 from henryonsoftware/08-operators
Basic operators, maths
2 parents eaddad7 + 0ebb08a commit 6e11c56

File tree

5 files changed

+166
-152
lines changed

5 files changed

+166
-152
lines changed
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
The answer is:
2+
Câu trả lời là:
33

44
- `a = 2`
55
- `b = 2`
@@ -9,10 +9,9 @@ The answer is:
99
```js run no-beautify
1010
let a = 1, b = 1;
1111

12-
alert( ++a ); // 2, prefix form returns the new value
13-
alert( b++ ); // 1, postfix form returns the old value
12+
alert( ++a ); // 2, dạng tiền tố trả về giá trị mới
13+
alert( b++ ); // 1, dạng hậu tố trả về giá trị cũ
1414

15-
alert( a ); // 2, incremented once
16-
alert( b ); // 2, incremented once
15+
alert( a ); // 2, tăng một lần
16+
alert( b ); // 2, tăng một lần
1717
```
18-

1-js/02-first-steps/08-operators/1-increment-order/task.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ importance: 5
22

33
---
44

5-
# The postfix and prefix forms
5+
# Dạng tiền tố và hậu tố
66

7-
What are the final values of all variables `a`, `b`, `c` and `d` after the code below?
7+
Giá trị cuối cùng của tất cả các biến `a`,` b`, `c` ` d` ở đoạn code dưới đây là gì?
88

99
```js
1010
let a = 1, b = 1;
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
The answer is:
21

3-
- `a = 4` (multiplied by 2)
4-
- `x = 5` (calculated as 1 + 4)
2+
Câu trả lời là:
3+
4+
- `a = 4` (được nhân với 2)
5+
- `x = 5` (được tính như 1 + 4)
56

1-js/02-first-steps/08-operators/2-assignment-result/task.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ importance: 3
22

33
---
44

5-
# Assignment result
5+
# Kết quả gán
66

7-
What are the values of `a` and `x` after the code below?
7+
Giá trị của `a` `x` ở đoạn code dưới đây là gì?
88

99
```js
1010
let a = 2;

0 commit comments

Comments
 (0)