Skip to content

Commit c601455

Browse files
authored
Merge pull request #113 from MShafquat/master
Basic operators, maths
2 parents 49a3f6a + 3ddf865 commit c601455

File tree

9 files changed

+193
-193
lines changed

9 files changed

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

2-
The answer is:
2+
উত্তর হচ্ছে:
33

44
- `a = 2`
55
- `b = 2`
@@ -9,10 +9,10 @@ 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, প্রিফিক্স ফর্ম নতুন ভ্যালু রিটার্ন করে
13+
alert( b++ ); // 1, পোস্টফিক্স ফর্ম পুরনো ভ্যালু রিটার্ন করে
1414

15-
alert( a ); // 2, incremented once
16-
alert( b ); // 2, incremented once
15+
alert( a ); // 2, একবার বৃদ্ধি পেয়েছে
16+
alert( b ); // 2, একবার বৃদ্ধি পেয়েছে
1717
```
1818

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+
# পোস্টফিক্স এবং প্রিফিক্স ফর্ম
66

7-
What are the final values of all variables `a`, `b`, `c` and `d` after the code below?
7+
নিচের কোডে `a`, `b`, `c` `d` এর ফাইনাল ভ্যালু কী হবে?
88

99
```js
1010
let a = 1, b = 1;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
The answer is:
1+
উত্তর হচ্ছে:
22

3-
- `a = 4` (multiplied by 2)
4-
- `x = 5` (calculated as 1 + 4)
3+
- `a = 4` (২ দিয়ে গুণ)
4+
- `x = 5` (১ + ৪ হিসেবে)
55

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+
# অ্যাসাইনমেন্টের ফলাফল
66

7-
What are the values of `a` and `x` after the code below?
7+
নিচের কোডে `a` এবং `x` এর মান কী হবে?
88

99
```js
1010
let a = 2;

1-js/02-first-steps/08-operators/3-primitive-conversions-questions/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ undefined + 1 = NaN // (6)
2020
1. কোন স্ট্রিংয়ের সাথে যোগের ক্ষেত্রে `"" + 1` তে `1` রূপান্তর হয়ে `"" + 1 = "1"` হয়। তাই এখানে পায় `"1" + 0`, এক্ষেত্রেও একই নিয়ম প্রযোজ্য।
2121
2. বিয়োগ `-` (প্রায় অন্যসব অপারেটরের মতই) শুধুমাত্র সংখ্যা নিয়ে কাজ করে, এটি ফাঁকা স্ট্রিংকে শূন্য তে রূপান্তর করে নেয় `""` থেকে `0` হবে।
2222
3. স্ট্রিং সংযুক্তকরণ নীতি অনুসারে `5` স্ট্রিংয়ে রূপান্তর হবে।
23-
4. বিয়োগের সময় স্ট্রিং সবসময় সংখ্যায় রূপান্তর হয়, তাই এক্ষেত্রে `" -9 "` সংখ্যা `-9` তে পরিবর্তন হয় (এখানে স্পেসগুলিকে উপেক্ষা করে )
23+
4. বিয়োগের সময় স্ট্রিং সবসময় সংখ্যায় রূপান্তর হয়, তাই এক্ষেত্রে `" -9 "` সংখ্যা `-9` তে পরিবর্তন হয় (এখানে স্পেসগুলিকে উপেক্ষা করে)।
2424
5. `null` হবে `0` সংখ্যায় রুপান্তরের পর।
2525
6. `undefined` হয়ে যায় `NaN` সংখ্যায় রূপান্তর করা হলে।
2626
7. স্পেসসমূহ বাদ দেয়া হয় সংখ্যায় রুপান্তর করলে, এখানে পুরো স্ট্রিংটাই বিভিন্ন স্পেসে তৈরি, যেমনঃ `\t`, `\n` এবং তাদের মাঝের "রেগুলার" স্পেসসমূহ। সুতরাং এটি ফাঁকা স্ট্রিংয়ের মতই, যা শুন্যতে (`0`) রুপান্তর হয়।

1-js/02-first-steps/08-operators/3-primitive-conversions-questions/task.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ undefined + 1
2424
" \t \n" - 2
2525
```
2626

27-
ভালো করে ভাবুন, লিখে রাখুন এবং আমদের উত্তরের সাথে মিলিয়ে দেখুন।
27+
ভালো করে ভাবুন, লিখে রাখুন এবং আমাদের উত্তরের সাথে মিলিয়ে দেখুন।
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
The reason is that prompt returns user input as a string.
1+
কারণ prompt ইউজার ইনপুটকে স্ট্রিং হিসেবে রিটার্ন করে।
22

3-
So variables have values `"1"` and `"2"` respectively.
3+
তাই ভ্যারিয়েবল দুটোর ভ্যালু হচ্ছে যথাক্রমে `"1"` এবং `"2"`
44

55
```js run
66
let a = "1"; // prompt("First number?", 1);
@@ -9,9 +9,9 @@ let b = "2"; // prompt("Second number?", 2);
99
alert(a + b); // 12
1010
```
1111

12-
What we should do is to convert strings to numbers before `+`. For example, using `Number()` or prepending them with `+`.
12+
আমাদের `+` এর আগে স্ট্রিংকে নাম্বারে রূপান্তর করে নেয়া উচিৎ। যেমন, `Number()` ব্যবহার করে বা আগে `+` বসিয়ে।
1313

14-
For example, right before `prompt`:
14+
যেমন একদম `prompt` এর আগে:
1515

1616
```js run
1717
let a = +prompt("First number?", 1);
@@ -20,7 +20,7 @@ let b = +prompt("Second number?", 2);
2020
alert(a + b); // 3
2121
```
2222

23-
Or in the `alert`:
23+
অথবা `alert`:
2424

2525
```js run
2626
let a = prompt("First number?", 1);
@@ -29,4 +29,4 @@ let b = prompt("Second number?", 2);
2929
alert(+a + +b); // 3
3030
```
3131

32-
Using both unary and binary `+` in the latest code. Looks funny, doesn't it?
32+
শেষ কোডে ইউনারি আর বাইনারি `+` দুটোই আছে। মজার দেখাচ্ছে, তাই না?

1-js/02-first-steps/08-operators/4-fix-prompt/task.md

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

33
---
44

5-
# Fix the addition
5+
# যোগটি ঠিক করুন
66

7-
Here's a code that asks the user for two numbers and shows their sum.
7+
নিচের কোডটি ইউজারের কাছ থেকে দুটি সংখ্যা নিয়ে তাদের যোগফল দেখায়।
88

9-
It works incorrectly. The output in the example below is `12` (for default prompt values).
9+
এটা ঠিকমতো কাজ করছে না। নিচের উদাহরণে আউটপুট আসছে `12` (ডিফল্ট prompt ভ্যালুর জন্য)।
1010

11-
Why? Fix it. The result should be `3`.
11+
কেন? এটি ঠিক করুন। ফলাফল `3` হওয়া উচিৎ।
1212

1313
```js run
1414
let a = prompt("First number?", 1);

0 commit comments

Comments
 (0)