5 > 4 → true
"apple" > "pineapple" → false
"2" > "12" → true
undefined == null → true
undefined === null → false
null == "\n0\n" → false
null === +"\n0\n" → false
কিছু কারণ:
<<<<<<< HEAD
- অবশ্যই true বা ঠিক হবে।
- আভিধানিকভাবে তুলনা তাই false বা ভুল।
- আবারও, আভিধানিকভাবে তুলনা, প্রথম স্ট্রিংয়ের
"2"
দ্বিতীয় স্ট্রিংয়ের"1"
এর থেকে বড়। null
এবংundefined
একমাত্র একে অপরের সমান।- যথাযথ সমতায়
===
দুটি ভ্যালু একই টাইপের হতে হয়। কিন্তু তারা ভিন্ন টাইপের। - এটি
(4)
নং এর মতো।null
একমাত্রundefined
এর সমান। - দুটি ভিন্ন টাইপের ভ্যালু বা মান। =======
- Obviously, true.
- Dictionary comparison, hence false.
"a"
is smaller than"p"
. - Again, dictionary comparison, first char of
"2"
is greater than the first char of"1"
. - Values
null
andundefined
equal each other only. - Strict equality is strict. Different types from both sides lead to false.
- Similar to
(4)
,null
only equalsundefined
. - Strict equality of different types.
c89ddc5d92195e08e2c32e30526fdb755fec4622