Skip to content

Commit 94ae99e

Browse files
committed
translated task & solution 3
1 parent 8291002 commit 94ae99e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

1-js/02-first-steps/14-function-basics/3-min/solution.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
A solution using `if`:
1+
راه حل با کمک `if`:
22

33
```js
44
function min(a, b) {
@@ -10,12 +10,12 @@ function min(a, b) {
1010
}
1111
```
1212

13-
A solution with a question mark operator `'?'`:
13+
راه حل با علامت سوال `'?'`:
1414

1515
```js
1616
function min(a, b) {
1717
return a < b ? a : b;
1818
}
1919
```
2020

21-
P.S. In the case of an equality `a == b` it does not matter what to return.
21+
پی‌نوشت: در حالت `a == b`، مهم نیست که چه چیزی برگردانده شود.

1-js/02-first-steps/14-function-basics/3-min/task.md

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

33
---
44

5-
# Function min(a, b)
5+
# تابع min(a, b)
66

77
Write a function `min(a,b)` which returns the least of two numbers `a` and `b`.
8+
تابع `min(a,b)` را بنویسید که کمترین را از دو عدد `a` و `b` خروجی می‌دهد.
89

9-
For instance:
10+
برای نمونه:
1011

1112
```js
1213
min(2, 5) == 2

0 commit comments

Comments
 (0)