What Will Be the Output ??? Objects In JavaScript Interview #16

Поділитися
Вставка
  • Опубліковано 5 вер 2024
  • 😍 Check my Instagram to Connect with me: / thapatechnical
    ✅ NodeJS Tutorial in Hindi 2020: • NodeJS Tutorial in Hin...
    ✅ Express JS Tutorial In Hindi in 2020: • Express JS Tutorial In...
    ************ Must Watch Videos For Web Development ************
    ➡️ ReactJS Tutorial in Hindi 2020 Playlist Link: • React JS Tutorial in H...
    ➡️ React JS Project Netflix App Part #1 in Hindi in 2020: • #22: Props in React Js...
    ➡️ Install VS Code for ReactJS LINK: www.thapatechn...
    😍😍 Check Programming Videos in One Hour👇
    ➡️ Complete Reactjs in One video here • ReactJS For Beginners ...
    ➡️ HTML in One Video: • Learn HTML in One Vide...
    ➡️ CSS in One video: • Learn Complete CSS In ...
    ➡️ CSS FlexBox in 30 Minutes: • CSS FlexBox in 30 Minu...
    ➡️ JavaScript in One video: • JavaScript in One Vide...
    ➡️ ECMAScript 6 in One Video: • ES5 & ES6 | ECMAScript...
    ➡️ HTML5 in one video: • HTML5 Tutorial in One ...
    ➡️ CSS3 in one video: • Learn Complete CSS3 In...
    ➡️ Bootstrap4 in One video: • Bootstrap 4 in One Vid...
    ➡️ Jquery in One video: • jQuery in One Video in...
    ➡️ JSON in one video: • JSON in One Video in H...
    ➡️ ReactJS in one video: • ReactJS For Beginners ...
    ➡️ PHP in One Video: • PHP TUTORIAL IN ONE VI...
    ➡️ NodeJS in one video: / ipnwakoibt
    ➡️ MySQL in one video: • Complete SQL & MySQL i...
    ********** CLICK HERE TO WATCH ************
    ➡️ Fetch API in JavaScript: • Fetch API in JavaScrip...
    ➡️ AJAX tutorial for beginners in Hindi: • AJAX tutorial for begi...
    ➡️ Template literals (Template strings) in ES6 in JavaScript in Hindi: • ES6 Tutorial #3: Templ...
    ➡️ Async Await in JavaScript in Hindi: • Async Await in JavaScr...
    ➡️ Promises in JavaScript in Hindi: • Master The Promises in...
    ➡️ Callback Hell in JavaScript: • Callback Hell in JavaS...
    ➡️ Advanced JavaScript in Hindi Playlist: • Advanced JavaScript Tu...
    ➡️ ECMAScript Tutorial in Hindi 2020: • Modern JavaScript ES6 ...
    ➡️ ES5 & ES6 | ECMAScript 6 in One Video in Hindi: • ES5 & ES6 | ECMAScript...
    ➡️ JavaScript Game Development Series in 2020: • JavaScript Game Develo...
    ➡️ Source Code Link: www.thapatechn...
    ➡️ Top 5 Programming Languages in 2020: • Top 5 Programming Lang...
    ➡️ Ludo Game JavaScript Link: • JavaScript Game in Hin...
    ➡️Plz show some love to My Siter UA-cam Channel and Plz Subscribe Link: / @mayabeautyvlogs878
    **************** MUST WATCH VIDEOS *****************
    ➡️ How to become a Full Stack Developer 2020: • How to become a Full S...
    ➡️ How To Become a Web Developer 2020: • How To Become a Web De...
    ➡️ How JavaScript Works: • How JavaScript Works i...
    ➡️ Follow me on Instagram: / vinodthapa55
    Make Website Responsive Using Media Queries in One Video in Hindi | Web Design Tutorial in Hindi
    ➡️ Link: • Make Website Responsiv...
    Guys, Please support my channel by SUBSCRIBE to my channel and share my videos in your Social Network TimeLines.
    Don't Forget to Follow me on all Social Network,
    Website Link: www.thapatechn...
    Instagram Link: / vinodthapa55
    Facebook Link: / vinodthapa55
    Twitter Link: / vb55thapa
    Facebook ThapaTechnical Page Link: www.facebook.c...

КОМЕНТАРІ • 26

  • @ThapaTechnical
    @ThapaTechnical  2 роки тому +6

    console.log("a+b", a == b); Guy's the Output will be True Here ok bcz both the var b and a var are referencing the same Empty object in the memory.

  • @dhavalmakwana131
    @dhavalmakwana131 2 роки тому +4

    Boom guys, Sir love from surat, today i purchased KTM RC 125 because of you🥰😍Thank you for awesome learning videos..

  • @bibhasash7371
    @bibhasash7371 2 роки тому +1

    It's returning -1 because even if both of their key values are same they are not pointing to the same memory location. Objects are reference type that's why only way to achieve equality in array or object is to make shallow copy by which both of the objects will point to the same memory location

  • @rupokkoiry8500
    @rupokkoiry8500 2 роки тому +1

    Thapa Technical
    It's a very easy question because Object are reference type {} == {} => false and that's why indexOf gave -1, Need more hard Interview question

  • @payalverma4653
    @payalverma4653 2 роки тому +1

    Thanks!

  • @AnandSingh-rp5lj
    @AnandSingh-rp5lj 2 роки тому

    Acchi lagi bhai

  • @azizulhakimashik1154
    @azizulhakimashik1154 2 роки тому

    I was really really looking for this. Thanks a lot

  • @ashwini4444
    @ashwini4444 2 роки тому +1

    @Vinod Sir , using console.log("a + c " + a == b) it has to print "a+c" true but in the program u have mentioned it is returning just false.
    i think here it is considering + a as + {} which is returning NaN and while comparing with b as holds an empty object so here NaN == {} output is false, have no clue why it is not printing a+c before, could you please explain ?
    console.log("a + c " , a == b) - output is a + c , true

    • @Akash57243
      @Akash57243 2 роки тому +1

      'console.log( "a+c" + a == b )' can be read as 'console.log( ("a+c" + a) == b)' because '+' operator has higher priority than '==' when evaluating an expression
      the output of ("a+c" + a) is the string "a+c[object Object]" because anything concatenated with a string gives a string as output
      the string "a+c[object Object]" then compared with b returns false
      hope this clears the doubt 😁

    • @hemantsoni211
      @hemantsoni211 2 роки тому

      @@Akash57243 Thank you for easy & clear explanation !

  • @apoorvlele6257
    @apoorvlele6257 2 роки тому +1

    let a = {}; let b = a; console.log(a == b) is returning true

  • @abantikakarmakar1988
    @abantikakarmakar1988 2 роки тому

    Thank you, sir!!

  • @CodeWavewithShahHussain
    @CodeWavewithShahHussain 2 роки тому

    Sir font caret fire font use in vs theme plz batyien

  • @kushpatel9164
    @kushpatel9164 2 роки тому

    it's nice

  • @nightcode.
    @nightcode. 2 роки тому

    sir please make a project on some api using javascript. && what is cors and how to solve cors errors in javascript. (i had cors errors while fetching an api)

  • @anujsharma8982
    @anujsharma8982 2 роки тому

    Which music you use in starting

  • @siddiquiaffan
    @siddiquiaffan 2 роки тому

    -1

  • @siddiquiaffan
    @siddiquiaffan 2 роки тому

    let element = arrName[1];
    console.log(arrName.indexOf(element))
    // 1

  • @Aditya_473
    @Aditya_473 2 роки тому

    Sir please i want to contact you. i have a big dream, i learned from you
    I want your help sir pls. Sir maybe your this help make my life sir. 🥺😭❤

  • @riazrabbani8052
    @riazrabbani8052 2 роки тому

    Thank you 💕

  • @sanketgawande5305
    @sanketgawande5305 2 роки тому

    Thanks 😊