Comparison of datatypes in javascript | chai aur

Sdílet
Vložit
  • čas přidán 16. 01. 2023
  • Visit chaicode.com for all related materials, community help, source code etc.
    share krdo linkedin pe
  • Věda a technologie

Komentáře • 158

  • @skill.spirit
    @skill.spirit Před rokem +44

    best javascript course exact point on point teaching without overexplanation , great sir I loved your way of teaching Thanks for such a valuable course

  • @Jai-xq5hi
    @Jai-xq5hi Před 10 měsíci +10

    I always got confused about javascript comparison results but I am now clear about the comparison and equality operators. Thank you for this type of valuable course.

  • @Sapien_01
    @Sapien_01 Před rokem +7

    संगणक की भाषा में अच्छी पकड़ और समझाने के तरीके से हम बहुत खुश हुए और हमें बहुत मजा आया

  • @vaishnavikumbhakarna2696
    @vaishnavikumbhakarna2696 Před 11 měsíci +4

    Best javascript course I have ever learn from . Very nice and undoubtful explanation 👌👍

  • @Jdk281
    @Jdk281 Před 9 měsíci +3

    Outstanding series I ever came across... Learning is not hard but use simple banane wala hona chaiye..❤.

  • @tech_channel110
    @tech_channel110 Před 9 měsíci

    real king sir hitesh,
    teaching kay asal meaning ko pura krty hvay

  • @rimonhossen2504
    @rimonhossen2504 Před rokem

    Best course I have seen on CZcams. Thanks! Hitesh sir

  • @ambaradhikari7425
    @ambaradhikari7425 Před rokem +19

    The reason is that an equality check == and comparisons > < >= = 0 is true and (1) null > 0 is false.
    On the other hand, the equality check == for undefined and null is defined such that, without any conversions, they equal each other and don’t equal anything else. That’s why (2) null == 0 is false.
    null is treated in a special way by the Equals Operator (==). In a brief, it only coerces to undefined:
    null == null; // true
    null == undefined; // true
    Value such as false, '', '0', and [] are subject to numeric type coercion, all of them coerce to zero.

  • @elyramzan
    @elyramzan Před 11 měsíci +10

    Type Conversion:-
    > from to Numbers:
    "33" => 33
    "33abc" => NaN
    true => 1; false => 0
    > from to Boolean:
    1 => true; 0 => false;
    NaN => false;
    "" => false;
    "hitesh" => true;
    >convert during operations
    =>if string is written first then convert all after it to string:
    "2" + 2 + 2 = 222
    "1" + 2 = 12
    =>if string comes after then the conversion occurs at last
    2 + 2 + "2" = 42
    1 + 1 + "2" + 2 + 1 = 2221
    #use +operand to convert the operand to number

  • @programmingholic
    @programmingholic Před rokem +1

    Thanks for sharing sir, Easy to understand, great explanation, following.

  • @yogeshkumarpatil591
    @yogeshkumarpatil591 Před 7 měsíci

    Thank you for making such a beautiful javascript tutorial. Because You teach the actual javascript which is necessary for actual production development need. Very Very thank you. I will share your channel as much as possible to everyone. I really like your teaching style and I aslo need that type of javascript teacher. God bless you.

  • @Instrumentation010
    @Instrumentation010 Před 8 měsíci

    No words for this extra ordinary explanation.

  • @Prernachaturvedi8720
    @Prernachaturvedi8720 Před 2 měsíci

    Best channel for js ..I share ur channel with all my friends

  • @MemonALi
    @MemonALi Před 11 měsíci +1

    Such an amazing course sir.!
    lots of love from Pakistan💕

  • @user-gs6ts3rd5z
    @user-gs6ts3rd5z Před 10 měsíci +2

    Great job Sir
    Love from pak

  • @user-mo1sy5ck7r
    @user-mo1sy5ck7r Před 4 měsíci

    best Series ALL OVER UNIVERSE, thank you Sir 🙏

  • @user-kq5pk8kr8c
    @user-kq5pk8kr8c Před 9 měsíci +5

    "Hey Chai or Code and Hitesh Choudhary, I'm on the edge of my seat in anticipation for the backend full series and DSA series on this channel! ☕💻 Your content is like the perfect blend of coding wisdom and the soothing essence of chai, and I can't wait to dive deep into these topics with your expert guidance. Keep brewing up those fantastic tutorials, and I'll keep sipping and coding along! 🚀🔥"

  • @chandanprajapati9704
    @chandanprajapati9704 Před rokem +2

    Best JavaScript course, Thank you sir ;)

  • @pranjalgogoigaming-1209
    @pranjalgogoigaming-1209 Před 8 měsíci

    I never tried these things, Feeling awesome after learn these comparison....

  • @samadsiddiqui5925
    @samadsiddiqui5925 Před 9 měsíci +2

    Loving your content!

  • @M.K.........
    @M.K......... Před rokem +2

    I love your calmness

  • @adityajain5336
    @adityajain5336 Před rokem +2

    best javascript course content sir jiiiii !!!!!!

  • @himanisain7738
    @himanisain7738 Před měsícem

    nice and helpful tutorial.

  • @vimalradadiya5929
    @vimalradadiya5929 Před rokem

    Khub khub abhaar apka for this video

  • @user-hj1sz7df2f
    @user-hj1sz7df2f Před 10 měsíci +1

    #8 tutorial thanks for this tutorial 🙂

  • @amandixit8342
    @amandixit8342 Před rokem

    Sir mein toh apka hi course dekhna cha rha for the web dev .....best hai ,asan toh ap kar hi dete hai aur hindi mein aa gye hai toh sone pe suhaaga 🙂

  • @meet_rakholiya
    @meet_rakholiya Před 6 měsíci

    Best javascript course I have ever learn

  • @SatyaGupta.
    @SatyaGupta. Před 5 měsíci

    Good morning guru ji ab AA gye phir se🎉

  • @udaypratapsingh8923
    @udaypratapsingh8923 Před rokem +4

    Great explnation ❤

  • @hackwithakshay
    @hackwithakshay Před rokem +2

    Love your voice 😍 sir ji apki voice ka koi comparison nhi 😂🤘

  • @BitFire007
    @BitFire007 Před 4 měsíci

    "I owe my JavaScript skills to Chai aur Code. Brilliant content and exceptional guidance!"

  • @harshitkaushal1584
    @harshitkaushal1584 Před 10 dny

    Great Content!!!

  • @techindepth371
    @techindepth371 Před 2 měsíci

    Best JavaScript Course till date. Amazing course. Cont day2

  • @yogendraprabhakar6834
    @yogendraprabhakar6834 Před rokem +3

    Waited long for this 😅

  • @pradeepucshorts
    @pradeepucshorts Před rokem +1

    expectional video!!!!! ⚡

  • @RohitChhabirajYadav
    @RohitChhabirajYadav Před rokem +1

    One of the best Best course of js in the world

  • @user-dc6ez1bv7s
    @user-dc6ez1bv7s Před 5 měsíci

    sir you are great ho ❤❤

  • @kartikrajput2131
    @kartikrajput2131 Před rokem +3

    hitesh is back with double energy!!
    now 3 videoes per day
    thank you in advance

  • @void-9
    @void-9 Před 5 měsíci

    awseome!

  • @onlysparsh
    @onlysparsh Před 8 měsíci

    Apne bht jagah comparison ko conversion bol diya sir bht confusion ho gya .. hahaha.. but still the best explaination

  • @ankushladani496
    @ankushladani496 Před rokem +1

    Dhanyawad guruji...🙏

  • @ismailyykhalid
    @ismailyykhalid Před 10 měsíci

    Awsome !!

  • @RahulSharma-wz6yv
    @RahulSharma-wz6yv Před 6 měsíci

    thanks for the amazing javascript videos

    • @chaiaurcode
      @chaiaurcode  Před 6 měsíci +1

      Glad you like them!😊☕️

    • @RahulSharma-wz6yv
      @RahulSharma-wz6yv Před 5 měsíci

      sir me apke saare videos pe comment karta hu, so that your channel and videos get more reach to the needy, Ab ap itna premium content de rahe hai jo pese de kr milna bhi thoda mushkil hota hai, toh apke liye itna toh sabhi ko krna hi chahiye. Thank you for replying me , I am very happy to see you reply@@chaiaurcode

  • @sahildar9942
    @sahildar9942 Před rokem +3

    Master class🙏🙏

  • @HarshitKumar-bv2nr
    @HarshitKumar-bv2nr Před 7 měsíci

    Thankyou 😃

  • @Knight004
    @Knight004 Před 5 měsíci

    CRAZY🔥

  • @Muwahid999
    @Muwahid999 Před měsícem

    Thank you Sir

  • @RRR.iphone
    @RRR.iphone Před 9 měsíci

    u are gennius

  • @CodeWithSanjay07
    @CodeWithSanjay07 Před 11 měsíci

    wow very nice video sir

  • @user-rb9bg5pi3h
    @user-rb9bg5pi3h Před 10 měsíci +2

    as u said, in comparison operator made null as 0 in 2nd console null==0 means 0==0 why is false?

  • @yash2275
    @yash2275 Před 2 měsíci

    I am currently studying from this playlist . Do i need to study from those two one shot or this playlist has same content . By the way you are awesome sir ji

  • @animeshgupta7288
    @animeshgupta7288 Před měsícem

    Nice

  • @meetchanchad129
    @meetchanchad129 Před 6 měsíci

    👍🏻

  • @roshanrawat4100
    @roshanrawat4100 Před 11 měsíci

    Thank you so much sir ji😊😊

  • @getit3505
    @getit3505 Před 10 měsíci

  • @thepast5488
    @thepast5488 Před 7 měsíci

    ❤❤

  • @MuhammadMatloobAhmed
    @MuhammadMatloobAhmed Před měsícem +1

    Sir g 4:18 mins pr jo note aap ney diya wo practically different hai jo aap kr k bta rhay, It's confusing please help

  • @loser2leader-en2lw
    @loser2leader-en2lw Před 7 měsíci

    ❤♥

  • @Mga-quotes
    @Mga-quotes Před 10 měsíci

    😍😍

  • @nbugdev
    @nbugdev Před 4 měsíci

    best 👑

  • @ashishkumarranjan808
    @ashishkumarranjan808 Před 11 měsíci

    Great

  • @bhushanpatil7557
    @bhushanpatil7557 Před rokem +1

    Maja a raha hai padhne mein 😍

  • @alizaman8407
    @alizaman8407 Před 4 měsíci

    😊

  • @BABABENNETT
    @BABABENNETT Před 5 měsíci

    hitesh sir op

  • @harshalborade5225
    @harshalborade5225 Před rokem +1

    your hindi is 🔥🔥

  • @ayush.tiwarios2105
    @ayush.tiwarios2105 Před 10 dny

    00:02 Comparison of datatypes in JavaScript
    01:10 Comparing data types in JavaScript
    02:19 When comparing values in JavaScript, make sure their data types are the same.
    03:27 The comparison and equality operators in JavaScript have different behaviors.
    04:36 JavaScript converts null to zero during comparison.
    05:44 Comparison and equality checks in JavaScript
    06:53 JavaScript datatype comparison with double and triple equal
    07:50 Avoid confusing conversions and comparisons in JavaScript

  • @arshad1781
    @arshad1781 Před rokem

    Thanks 👍

  • @RohitChhabirajYadav
    @RohitChhabirajYadav Před rokem

    super sir

  • @arahamabeddin7442
    @arahamabeddin7442 Před 9 měsíci

    Done sir❤

  • @user-sc8qd3yw8w
    @user-sc8qd3yw8w Před 8 měsíci

    I love to Chai or Code JavaScript to All Video

  • @Nitu-zs7vq
    @Nitu-zs7vq Před 7 měsíci

    Best javascript course

  • @unknowngamer5106
    @unknowngamer5106 Před rokem +2

    certificate necessary to get a job ?

  • @user-xj5hn6ir1e
    @user-xj5hn6ir1e Před 10 měsíci

    JavaScript me "new" keyword kis lye use huta ha?? and tostring() kab use krna chahye
    kindly reply jo b read kry

  • @ayushrana3951
    @ayushrana3951 Před 8 měsíci +1

    Day 6 completed ✅

  • @dhruvjagannath7666
    @dhruvjagannath7666 Před rokem +1

    New video kab ayga?...(JavaScript)

  • @framedream0
    @framedream0 Před 6 měsíci

    what is typescript in easy language?and pls give me a daily life example !!!?

  • @sayandeepsadhukhan5016
    @sayandeepsadhukhan5016 Před 11 měsíci

    😄😍😍😍😍

  • @ankushladani496
    @ankushladani496 Před rokem +4

    If null is treated as 0 then 2nd should also be give true. Why it's not?

    • @TradingTales
      @TradingTales Před 5 měsíci

      Same doubt

    • @NaveenM-qz8dt
      @NaveenM-qz8dt Před 11 dny

      Because equality check doesn't convert null into 0 only comparision operators do

  • @rajansharma9066
    @rajansharma9066 Před 4 měsíci

    Sir, could you please recommend a source where I can practice for JavaScript interviews?"

  • @user-cb1dr3ly1f
    @user-cb1dr3ly1f Před 11 měsíci +1

    (null == 0 ) --> here null is not converted ,
    but in ( '2' ==2) --> converted and check , u said in equality check it is not converted but in '2' it is getting converted.

  • @akshitagarg5914
    @akshitagarg5914 Před rokem +6

    Why is null == 0 is false if null is converted to 0

    • @abdulmatania8155
      @abdulmatania8155 Před 8 měsíci +3

      Only comparisons convert null to 0, not equality operator.

    • @ShubhamPanchal-zv7bp
      @ShubhamPanchal-zv7bp Před 7 měsíci

      accha tu bada janta he@@abdulmatania8155

    • @muhammadhassan48
      @muhammadhassan48 Před 7 měsíci

      The answer to that is rather simple: a NULL means that there is no value, we're looking at a blank/empty cell, and 0 means the value itself is 0.

  • @abhishekb303
    @abhishekb303 Před 8 měsíci

    console.log(3 == "3");
    sir mera isme bhi answer true aa raha hai lakin equality check me to number me convert nahi hona chahiye please iska reason samjado muje.
    thankyou

  • @user-rn8hg4hl4d
    @user-rn8hg4hl4d Před 3 měsíci

    Sir phir yaha (2) me null == 0 iska result false q aaya hai jub null convert hojata hai 0 me🤔

  • @mrityunjayvyas1306
    @mrityunjayvyas1306 Před rokem +1

    Sir kya Hindi mai react js ki play list bhi aae gi kya

  • @aryanmehta7848
    @aryanmehta7848 Před 10 měsíci

    I got question in interview console.log([] === []) it gives output false I can't understand the logic behind it.

  • @radhakantpanda363
    @radhakantpanda363 Před 8 měsíci

    DONE WITH COMPARISIONS

  • @manojkumar22232
    @manojkumar22232 Před 6 měsíci

    typeof compaire mein boolean datatype kyu dikhata hai

  • @JitendraNathChandra
    @JitendraNathChandra Před měsícem

    But Sir the comparison between "2" and "j" console.log("2">"j") is false because of 2 unicode 50 and j unicode is 106 , since 2 comes before j that's why "2" is not greater than "j" right?

  • @Gunjan_Mishra
    @Gunjan_Mishra Před rokem +1

    CSS ke videos kab ayega sir?...

  • @sudhanshukumar1897
    @sudhanshukumar1897 Před rokem +1

    Sir aagla video kb aayega🤔

  • @iamwaves__TMT
    @iamwaves__TMT Před rokem +2

    How I remember js code because I forget the code

  • @Sachin-yt5bo
    @Sachin-yt5bo Před 7 měsíci +1

    4:19 if null is converted to a number assuming zero then y nul==0 is false

  • @bhuvnesh4752
    @bhuvnesh4752 Před 4 měsíci

    Aaj sikha undefined and null with comparators

  • @DoonSafari
    @DoonSafari Před 10 měsíci +1

    Please clear this console.log(null == 0);
    why false as you explaining null is converted into 0 why false then

  • @malaikaishfaq2717
    @malaikaishfaq2717 Před 11 měsíci

    please share your other channel link for typescript

  • @hustle_withvikas
    @hustle_withvikas Před měsícem

    bhai chai kaha h aaap ki

  • @vishu3766
    @vishu3766 Před rokem

    Rom Rom ji

  • @prakhargupta4347
    @prakhargupta4347 Před rokem +1

    sir naya video kab ayega?

  • @user-pi8rk8bl8g
    @user-pi8rk8bl8g Před 11 měsíci

    done

  • @KinoNoTabi-gj6tm
    @KinoNoTabi-gj6tm Před 10 měsíci

    BURGIR 🍔👍