File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
1-js/02-first-steps/14-function-basics/3-min Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1- A solution using ` if ` :
1+ راه حل با کمک ` if ` :
22
33``` js
44function 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
1616function 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 ` ، مهم نیست که چه چیزی برگردانده شود .
Original file line number Diff line number Diff line change @@ -2,11 +2,12 @@ importance: 1
22
33---
44
5- # Function min(a, b)
5+ # تابع min(a, b)
66
77Write 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
1213min (2 , 5 ) == 2
You can’t perform that action at this time.
0 commit comments