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...
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.
Boom guys, Sir love from surat, today i purchased KTM RC 125 because of you🥰😍Thank you for awesome learning videos..
Congrats!
Btw how did you purchased ktm?
I learned from thapa sir and got a job in MNC.
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
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
Thanks!
Acchi lagi bhai
I was really really looking for this. Thanks a lot
@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
'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 😁
@@Akash57243 Thank you for easy & clear explanation !
let a = {}; let b = a; console.log(a == b) is returning true
+1
when you do b=a, b has the same reference of whatever a was pointing to.
Thank you, sir!!
Sir font caret fire font use in vs theme plz batyien
it's nice
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)
Which music you use in starting
-1
let element = arrName[1];
console.log(arrName.indexOf(element))
// 1
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. 🥺😭❤
Thank you 💕
Thanks 😊