Comparison of datatypes in javascript | chai aur

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 181

  • @skill.spirit
    @skill.spirit Год назад +60

    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 Год назад +14

    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 Год назад +11

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

  • @SyedaMuskanAliShah
    @SyedaMuskanAliShah 7 дней назад

    Sir me ny RUclips sy bhut tutorial dhky hn pr ap ki series sy jo confident ur motivation mile ha wo ur kahi sy ni mil skii.. ab lgta ha coding muskil ni ha ur ap ka parhany ka tariqa bahtreen ha...❤

  • @vaishnavikumbhakarna2696
    @vaishnavikumbhakarna2696 Год назад +5

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

  • @Pubgmobile70545
    @Pubgmobile70545 8 месяцев назад +1

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

  • @ambaradhikari7425
    @ambaradhikari7425 Год назад +22

    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.

    • @indian-shorts9215
      @indian-shorts9215 Год назад

      kaahan se uthaya ye

    • @hiphop861
      @hiphop861 11 месяцев назад

      Thank you so much it is wonderful information

    • @RahulKumar-ed9vw
      @RahulKumar-ed9vw 8 месяцев назад

      Thanks for information.👍👍

    • @sameer07x19
      @sameer07x19 3 месяца назад

      This explanation is neat 👍

  • @elyramzan
    @elyramzan Год назад +15

    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

  • @Jdk281
    @Jdk281 Год назад +3

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

  • @sachin0xblock
    @sachin0xblock Год назад +6

    "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! 🚀🔥"

  • @ayush.tiwarios2105
    @ayush.tiwarios2105 3 месяца назад

    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

  • @yogeshkumarpatil591
    @yogeshkumarpatil591 10 месяцев назад

    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.

  • @MemonALi
    @MemonALi Год назад +1

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

  • @yawarabbas3363
    @yawarabbas3363 2 месяца назад

    A very detailed playlist enjoyed alot within investigation study

  • @chandanprajapati9704
    @chandanprajapati9704 Год назад +2

    Best JavaScript course, Thank you sir ;)

  • @tech_channel110
    @tech_channel110 Год назад

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

  • @MAli-o4r1j
    @MAli-o4r1j Год назад +3

    Great job Sir
    Love from pak

  • @Prernachaturvedi8720
    @Prernachaturvedi8720 5 месяцев назад

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

  • @programmingholic
    @programmingholic Год назад +1

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

  • @Instrumentation010
    @Instrumentation010 11 месяцев назад

    No words for this extra ordinary explanation.

  • @viraljain9197
    @viraljain9197 2 месяца назад

    Thank you to Hitesh Sir for making such an awesome video! 🙌🎥 Brushing up on my JS knowledge 🧠

  • @AnwarHussain-hr8lm
    @AnwarHussain-hr8lm 2 месяца назад

    Bro this is Really paid leave course
    I have already watched JavaScript tutorial on a other channel. But I made to much mistakes in JavaScript. After watching your course I can understand JavaScript easy. Your Way of Teaching is Amazing. You teach Everything perfectly. Thanks for your effort
    Big fan from Pakistan ❤❤❤❤❤❤❤

  • @rimonhossen2504
    @rimonhossen2504 Год назад

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

  • @pranjalgogoigaming-1209
    @pranjalgogoigaming-1209 11 месяцев назад

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

  • @RagSingh-e2e
    @RagSingh-e2e 8 месяцев назад

    best Series ALL OVER UNIVERSE, thank you Sir 🙏

  • @adityajain5336
    @adityajain5336 Год назад +2

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

  • @techindepth371
    @techindepth371 5 месяцев назад

    Best JavaScript Course till date. Amazing course. Cont day2

  • @M.K.........
    @M.K......... Год назад +2

    I love your calmness

  • @hackwithakshay
    @hackwithakshay Год назад +2

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

  • @BitFire007
    @BitFire007 7 месяцев назад

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

  • @meet_rakholiya
    @meet_rakholiya 9 месяцев назад

    Best javascript course I have ever learn

  • @bhaskarmoger1160
    @bhaskarmoger1160 Месяц назад +1

    console.log(null == 0) //false
    because in loose equality( == )
    null is the only datatype that loosely equal to undefined.
    So, undefined == 0 that is false

  • @amandixit8342
    @amandixit8342 Год назад

    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 🙂

  • @samadsiddiqui5925
    @samadsiddiqui5925 Год назад +2

    Loving your content!

  • @onlysparsh
    @onlysparsh Год назад

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

  • @yash2275
    @yash2275 5 месяцев назад

    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

  • @RohitChhabirajYadav
    @RohitChhabirajYadav Год назад +1

    One of the best Best course of js in the world

  • @DhariSingh-w6v
    @DhariSingh-w6v Год назад +1

    #8 tutorial thanks for this tutorial 🙂

  • @udaypratapsingh8923
    @udaypratapsingh8923 Год назад +4

    Great explnation ❤

  • @himanisain7738
    @himanisain7738 4 месяца назад

    nice and helpful tutorial.

  • @yogendraprabhakar6834
    @yogendraprabhakar6834 Год назад +3

    Waited long for this 😅

  • @MuhammadMatloobAhmed
    @MuhammadMatloobAhmed 4 месяца назад +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

  • @mahimasingh7524
    @mahimasingh7524 8 дней назад

    You are great sir ❤

  • @pulkitsharma2478
    @pulkitsharma2478 Год назад +4

    गुरु वो होता हैं जो विद्या का दान देता हैं ,
    विद्या का व्यापार नहीं करता |❤❤

    • @chaiaurcode
      @chaiaurcode  Год назад +12

      guruji ko b to pet me bhojan chahiye

    • @pulkitsharma2478
      @pulkitsharma2478 Год назад

      @@chaiaurcode sir aap Jo effort de rahe hain wo hi kaafi hai iss quote ko justify karne ke liye. Bhagwan apko khoob tarakki de 🙏 🙏

  • @sameer23377
    @sameer23377 Месяц назад

    Thanks for the video Sir ❤

  • @ankushladani496
    @ankushladani496 Год назад +1

    Dhanyawad guruji...🙏

  • @SatyaGupta.
    @SatyaGupta. 8 месяцев назад

    Good morning guru ji ab AA gye phir se🎉

  • @vimalradadiya5929
    @vimalradadiya5929 Год назад

    Khub khub abhaar apka for this video

  • @Abhisheksingh-nt8fv
    @Abhisheksingh-nt8fv Месяц назад

    sir please typescript ka bhi tutorial hindi me in depth upload kijiye please

  • @RahulSharma-wz6yv
    @RahulSharma-wz6yv 9 месяцев назад

    thanks for the amazing javascript videos

    • @chaiaurcode
      @chaiaurcode  9 месяцев назад +1

      Glad you like them!😊☕️

    • @RahulSharma-wz6yv
      @RahulSharma-wz6yv 9 месяцев назад

      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

  • @framedream0
    @framedream0 10 месяцев назад

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

  • @RajivRanjan-w6b
    @RajivRanjan-w6b Год назад +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.

  • @JitendraNathChandra
    @JitendraNathChandra 4 месяца назад

    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?

  • @yashvlogsindore
    @yashvlogsindore 3 месяца назад

    sir ,
    1. console.log(null > 0);
    2. console.log(null == 0); 3. console.log(null >= 0 );
    apne bola ki 3 wale log me null ki value apne app 0 conclude kr leta hai to baki 1,2 , log me kyu nhi krta hai ??????

  • @dhruvjagannath7666
    @dhruvjagannath7666 Год назад +1

    New video kab ayga?...(JavaScript)

  • @ShahidIjaz-t3o
    @ShahidIjaz-t3o Год назад +2

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

    • @lizzimcguire4554
      @lizzimcguire4554 Месяц назад +1

      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.

  • @Sachin-yt5bo
    @Sachin-yt5bo 10 месяцев назад +1

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

    • @MuhammadMatloobAhmed
      @MuhammadMatloobAhmed 4 месяца назад

      Yeah exactly , i'm finding such guy who notice this

    • @lizzimcguire4554
      @lizzimcguire4554 Месяц назад

      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.

  • @ManahilHasan-w7u
    @ManahilHasan-w7u Год назад

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

  • @sahildar9942
    @sahildar9942 Год назад +3

    Master class🙏🙏

  • @ankushladani496
    @ankushladani496 Год назад +4

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

    • @TradingTales
      @TradingTales 8 месяцев назад

      Same doubt

    • @NaveenM-qz8dt
      @NaveenM-qz8dt 3 месяца назад

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

  • @javedrajput7451
    @javedrajput7451 18 дней назад

    Great

  • @harshitkaushal1584
    @harshitkaushal1584 3 месяца назад

    Great Content!!!

  • @DoonSafari
    @DoonSafari Год назад +1

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

  • @jrahul42
    @jrahul42 3 месяца назад

    great work

  • @rakeshmourya6102
    @rakeshmourya6102 2 месяца назад

    Awesome video...

  • @muhammadumair72114
    @muhammadumair72114 2 месяца назад

    please explain how console.log(null == 0) is false??? (*you said JS treats null as 0)
    where as console.log(null >= o) is true???

  • @Muwahid999
    @Muwahid999 4 месяца назад

    Thank you Sir

  • @KalapeeGajjar
    @KalapeeGajjar 11 месяцев назад

    I love to Chai or Code JavaScript to All Video

  • @akshitagarg5914
    @akshitagarg5914 Год назад +7

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

    • @abdulmatania8155
      @abdulmatania8155 11 месяцев назад +6

      Only comparisons convert null to 0, not equality operator.

    • @ShubhamPanchal-zv7bp
      @ShubhamPanchal-zv7bp 11 месяцев назад

      accha tu bada janta he@@abdulmatania8155

    • @muhammadhassan48
      @muhammadhassan48 11 месяцев назад +3

      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.

  • @JRehmanRehman
    @JRehmanRehman 6 месяцев назад

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

  • @meetchanchad129
    @meetchanchad129 10 месяцев назад

    👍🏻

  • @Evilasdevil
    @Evilasdevil Месяц назад

    Awesome

  • @rajansharma9066
    @rajansharma9066 8 месяцев назад

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

  • @Piyushkumar-kq2ec
    @Piyushkumar-kq2ec 2 месяца назад

    thank you sir

  • @mahendra_radheofficial5337
    @mahendra_radheofficial5337 5 месяцев назад

    sir postfix or prefix ka ye smjh nahi aaya
    let y ,x =5, a = 4, b = 6
    y = --x + a ++ + ++ b
    console.log(y) ye wala smjh nahi aaya
    console.log(x)
    console.log(a)
    console.log(b)

  • @Mga-quotes
    @Mga-quotes Год назад

    😍😍

  • @abhishekb303
    @abhishekb303 11 месяцев назад

    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

  • @pradeepucshorts
    @pradeepucshorts Год назад +1

    expectional video!!!!! ⚡

  • @1amAjay
    @1amAjay Месяц назад +1

    How sir doing copy console.log in next line, koi btaega 5:34

    • @aiza671
      @aiza671 14 дней назад

      ctrl+ shift+ down arrow

  • @kartikrajput2131
    @kartikrajput2131 Год назад +3

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

  • @unknowngamer5106
    @unknowngamer5106 Год назад +2

    certificate necessary to get a job ?

  • @th3graduate292
    @th3graduate292 Год назад

  • @alizaman8407
    @alizaman8407 7 месяцев назад

    😊

  • @HarshitKumar-bv2nr
    @HarshitKumar-bv2nr 10 месяцев назад

    Thankyou 😃

  • @thepast5488
    @thepast5488 10 месяцев назад

    ❤❤

  • @Nitu-zs7vq
    @Nitu-zs7vq 10 месяцев назад

    Best javascript course

  • @aryanmehta7848
    @aryanmehta7848 Год назад

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

  • @bhuvnesh4752
    @bhuvnesh4752 7 месяцев назад

    Aaj sikha undefined and null with comparators

  • @SharadWaje-k2p
    @SharadWaje-k2p 8 месяцев назад

    sir you are great ho ❤❤

  • @roshanrawat4100
    @roshanrawat4100 Год назад

    Thank you so much sir ji😊😊

  • @sudhanshukumar1897
    @sudhanshukumar1897 Год назад +1

    Sir aagla video kb aayega🤔

  • @mrityunjayvyas1306
    @mrityunjayvyas1306 Год назад +1

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

  • @AmitkumarSingh-d1z
    @AmitkumarSingh-d1z 13 дней назад

    best coding

  • @TheSilentObserver30
    @TheSilentObserver30 10 месяцев назад

    ❤♥

  • @qualcoStreaming
    @qualcoStreaming Год назад

    06:48 SIR you type "2" === 2 so its output is true but if we type 2 === "2" then its false

    • @digiheadwaybusiness9204
      @digiheadwaybusiness9204 Год назад

      console.log("2" === 2); and console.log(2 === "2") dono hi case me false aaye ga !! kyunki === conversion kerny hi nhi dega :)

  • @animeshgupta7288
    @animeshgupta7288 4 месяца назад

    Nice

  • @aniketkadam9830
    @aniketkadam9830 2 месяца назад

    If null is converted to zero, why does null == 0 return false?

    • @navnisingh5512
      @navnisingh5512 Месяц назад

      Bcz only comparisons let the js convert the data types...
      Not equality checks ( they treat null as null ,not 0)

  • @Gunjan_Mishra
    @Gunjan_Mishra Год назад +1

    CSS ke videos kab ayega sir?...

  • @CodeWithSanjay07
    @CodeWithSanjay07 Год назад

    wow very nice video sir

  • @ashishkumarranjan808
    @ashishkumarranjan808 Год назад

    Great