Skip to content

Comparisons #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 7, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ null == "\n0\n" → false
null === +"\n0\n" → false
```

Some of the reasons:
কিছু কারণ:

1. Obviously, true.
2. Dictionary comparison, hence false.
3. Again, dictionary comparison, first char of `"2"` is greater than the first char of `"1"`.
4. Values `null` and `undefined` equal each other only.
5. Strict equality is strict. Different types from both sides lead to false.
6. Similar to `(4)`, `null` only equals `undefined`.
7. Strict equality of different types.
1. অবশ্যই true বা ঠিক হবে।
2. আভিধানিকভাবে তুলনা তাই false বা ভুল।
3. আবারও, আভিধানিকভাবে তুলনা, প্রথম স্ট্রিংয়ের `"2"` দ্বিতীয় স্ট্রিংয়ের `"1"` এর থেকে বড়।
4. `null` এবং `undefined` একমাত্র একে অপরের সমান।
5. যথাযথ সমতায় `===` দুটি ভ্যালু একই টাইপের হতে হয়। কিন্তু তারা ভিন্ন টাইপের।
6. এটি `(4)` নং এর মতো। `null` একমাত্র `undefined` এর সমান।
7. দুটি ভিন্ন টাইপের ভ্যালু বা মান।
21 changes: 10 additions & 11 deletions 1-js/02-first-steps/08-comparison/1-comparison-questions/task.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
importance: 5
গুরুত্ব: 5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
গুরুত্ব: 5
importance: 5

এই লাইন কখনো অনুবাদ হবে না।


---

# Comparisons
# তুলনা

What will be the result for these expressions?
নিচের লাইন গুলোর ফলাফল কী হবে?

```js no-beautify
5 > 4
"apple" > "pineapple"
"2" > "12"
undefined == null
undefined === null
null == "\n0\n"
null === +"\n0\n"
5 > 4;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
5 > 4;
5 > 4

মুল কোডের মধ্যে সেমিকোলন নেই। এইখানে সেমিকোলন এড করা হয়েছে। পরবর্তি সবগুলি লাইন থেকে সেমিকোলন রিমুভ হবে।

"apple" > "pineapple";
"2" > "12";
undefined == null;
undefined === null;
null == "\n0\n";
null === +"\n0\n";
```

Loading