I have never seen a better JavaScript interview than that.
@rampraveshthakur18796 ай бұрын
same
@JunaidShareef-j4u4 ай бұрын
try looking for another one's
@viraldimention23 күн бұрын
Cmon you gotta be kidding me
@Aerotk8 ай бұрын
Couldn't be more better. I have learned a lot from this interview. Please upload more interviews like this in future!
@UdayAhir-j2u5 ай бұрын
For the circles intersection problem we can also use Euclid's distance formula which is Square root of((x1-x2)²+(y1-y2)²) And check if the distance is less than sum of radius, if yes (intersection) else (no intersection) Also for the last part of interview if the circle lies inside another circle than its a case of total overlap so in order to check that we can simply use if distance is less than RADIUS1 than the second circle is surely lies inside first circle so in that case "total overlap'
@Roman-ud5ph8 ай бұрын
defer attribute : downloads the script file asynchronous but will run it after all our dom html and css are loaded. async attribute : is also downloaded asynchronous but will immediately run after it is downloaded, even though our html css file are not loaded , which can cause errors!! So, many developers or most of the time we use defer attribute like inside head tag❤ Sir, I have filled the for, it’s been months but still i haven’t gotten the mail for an interview
@arjunprajapatt8 ай бұрын
literraly brother you just nailed it. I could not think even how to do it. btw your googling skill is also good as you can understand it by seeing the examples I can not do it.
@NikhilPatel-bq7ck8 ай бұрын
Good Candidate, interactive + pushing him self towards solving problems taking baby steps to reach closer to expected output which is good.
@prashantdixit49258 ай бұрын
29:40 , another way to resolve promise only when the button is clicked.. let res1; const pr=new Promise((res,rej)=>{ res1=res; }) document.querySelector('button').addEventListener('click',(e)=>{ res1('resolved successfully'); console.log(pr); })
@Tech-NOOB8 ай бұрын
What is happening inside the promised call back function How the res1=res working ?
@Ameyiscool8 ай бұрын
@@Tech-NOOB let res1; //res1 = undefined res1 = res = undefined = truthy value Hence the promise is resolved. Mere khayal se res1 = res means the parameter which is res i.e resolve in full form is having an undefined value from the let variable res1. Eve though res1 is undefined but it still exists hence resolve from the call back function (res,rej) becomes true and hence the event listener will successfully resolve the promise since the promise is resolved via res1 = undefined = res (i.e resolve). He should have given res1 = 1 or any value instead because assigning any variable value is undefined is a bad practice. I hope you find this answer helpful, if I'm making a mistake then anyone can ask me and let me know.
@fitnessforlifetamil39365 ай бұрын
but the question here is the promise needs to be resolved after clicking the button in your code it is resolved then and there in the declaration.
@prashantdixit49254 ай бұрын
@@fitnessforlifetamil3936 no, i am just assigning the reference of res intro res1, i am resolving the function later in the event listener
@NamanSaini16 күн бұрын
At 1:52:52 problem was not a calculation issue but due to single variable radius. At that instant radius was being used as diameter in circle construction but as radius in checking intersection logic. Hence, the error. An alternate fix is that we could have passed radius/2 to intersection logic as that was correct radius.
@saptarsidebnath35167 ай бұрын
Really this interview was very good. It was inspirational. I liked the calmness and positive attitude of Avinash. From this interview I learned a lot of things.
@prateekyadav7977 ай бұрын
at 48:00, so async function is just a sugar coated way of making promises hence it will be pushed on to miscrotask queue which will be executed asynchronously by event loop without blocking the main thread. Code outside of async function will work on main thread asynchronosly and inside of async function it will be synchronous since await keyword will block the execution of lines of code inside function hence if at line 5 there's an await then after promise resolves execution inside async function will continue from line 6. Any improvement to this is appreciated
@ganeshrasal5558 ай бұрын
always learn something new - yes we can use await outside async function defining by type='module' in a script file
@Shivasai218 ай бұрын
This was the best interview i have ever seen , sir please do this kind interviews .Like if ur taking interview for fresher u can also add some extra questions like this it will be helpful for us.
@mallikarjuntr35156 ай бұрын
Perfect interview process man, i learned a lott, lots of love man,
@OsafAhmed-l9r2 ай бұрын
yes
@amdadullahraihan76948 ай бұрын
This was the most interesting interview on your channel, sir.
@_SubhamChandra_CSEA3 ай бұрын
Such a confident and presentable guy... This video really taught me how to confidently give answers in interview. Thank you so much..❤❤
@curiousgkc28797 ай бұрын
Thank you for these amazing videos... I have tried both output based question of promise and the machine coding circles problem and I got it and solved somewhat in easy way before watching the solution. It feels good😊... I'm a fresher preparing for frontend interview. May be idk how I'll perform in pressure.
@forstudycode61468 ай бұрын
Thanx for the nice mind broggling questions. It took me 2 to 3 h to code the machine coding question. But I am very happy that I have coded it successfully without any help.😊
@forstudycode61468 ай бұрын
I have solved similar question in leetcode regarding 2d matrix
@gautamkhatri78958 ай бұрын
Sir we need more such types of videos, this video is goldmine for many of us. thnakyou very very much :)
@faizalkhan24378 ай бұрын
I heared the question, I was going in shocked but bro you nailed it... And I have learn something it is valuable video....
@badalhalder-mx5nv8 ай бұрын
I first time introduced like replaceable and non-replaceable inline element...thanks a lot and I think you are a genius person..I am from bangladesh
@DebayanMukherjee-wo2ul8 ай бұрын
I found only two interviews interesting.......one is ankit Tripathi one......and now another this one
@procodrr8 ай бұрын
kzbin.info/www/bejne/g4G8XoaLZrutiKs You will like this one as well.
@DeepakVerma-xl9wx8 ай бұрын
@@procodrr I saw this but screen was smaller so not able to got much
@jayshah44568 ай бұрын
can you please share that ankit tripathi interview video link
Perfect interview process man, i learned a lott, lots of love man,
@anujeetswain73688 ай бұрын
Machine code was a good question. I tried it and it was easy for me. Great confidence boost.! For an engineer, math should be easy
@tariqahmed25262 ай бұрын
1:53:43 agar diameter uthatey na radius ki jagah to question buht jaldi solve hojata
@Maik.iptoux5 ай бұрын
1:26:00, is this so complicated? I never programmed in js, but can he not easily check if the x and y is in the array like in python? If x,y in z then?
@PraNihaal8 ай бұрын
Must watch interview.. we are expecting these kind of interviews
@hawkishgamingxp8 ай бұрын
38:15 Sir I have successfully created a promise with pending state without using promise keyword Code --> async function createPromise() { return "promise is resolved"; } console.log(createPromise().then((data) => console.log("data",data))); How works :- Async function always return a promise either we will return something or not and if we console the function then the return value be a promise with fulfilled state and we know that we can call then() method to a promise either it is fulfilled or not and here the concept come that every then() method return a promise with pending state. So that way I have successfully solved the question.
@procodrr8 ай бұрын
Yes, that is 100% correct. That promise will be pending for a moment and it will resolve immediately. So yes it is technically correct but we can't control that promise's state. Thanks for providing this solution.
@hawkishgamingxp8 ай бұрын
@@procodrr yes sir
@asiffaiz32027 ай бұрын
bro you nailed it 🔥
@_ByteBuddy8 ай бұрын
32:42 const btn=document.querySelector("button"); let getdata=()=>{ return new Promise((res,rej)=>{ btn.addEventListener("click",()=>{ res("button is clicked"); }) }) } btn.addEventListener("click",()=>{getdata().then((res)=>{ console.log(res); })}) //Is it correct
@IsrarUlhaq-km4gu2 ай бұрын
thank you so much for such informative videos , ! such a great way of learning , lot of love , and respect ,
@unparallel77185 ай бұрын
my logic for intersection is that we can get a distance between two circles by using this formula `let distance = Math.sqrt((arr["X"]-x)**2+(arr["Y"]-y)**2)`. This is a basic distance formula i.e. root_under((x2-x1)^2 + (y2-y1)^2). This will give us the distance between the centers of two circles and if the sum of the radius of circle1 and circle2 is greater than or equal to the distance between their center circles are intersecting. I think this will work but please consider some margin of errors.
@ishratkaur16056 ай бұрын
what is the question at 40:20 ? if all we have to do is show the pending state, we can simply log the promise.
@crazyvaleideas8 ай бұрын
Finally, got something different! Just finding this information - Thanks for this informative content. Learnt something new !! ❤
@samK12_185 ай бұрын
54:40 script1.js is not a javascript module then how it is able to export a variable (i.e export {variable}).?
@manasat87136 ай бұрын
Both of you did a wonderful job inspiring coders
@VijayKumar-tk6my6 ай бұрын
learned lots of new thing and very informative .Best interview i have seen ever.
@procodrr6 ай бұрын
Glad you enjoyed it 😊
@konakandlarohith66814 ай бұрын
I have learned a lot after watching this interview.Thanks for uploading this video.
A higly valued video for a web developer. I have come to know about many new things in it.
@shubhamsharma277326 күн бұрын
For a concentric circle or a circle inside another circle that is not intersecting, we just have to check whether the distance between the centers is greater or equal to the difference between the radius.
@Vivek-gt4gm8 ай бұрын
I am also starting Frontend Interview Preparation, with an amazing group where we discuss important questions in Zoom meetings regularly. if anyone who is really seriously wants to join let me know.(MERN with JavaScript)
@yogeshabdar43052 ай бұрын
HI, interested in interview preparation
@ravishbisht5028 ай бұрын
Sir this is what i was looking for. Ese hi laya kro videos
@procodrr8 ай бұрын
Thanks, lekin sabhi log aise nahi hote hain.
@ravishbisht5028 ай бұрын
@@procodrr mera b le lo sir ek interview 😉🥰
@ANANDKUMAR-in3pc8 ай бұрын
With the help of your video and your KZbin channel, I cracked the interview.
@procodrr8 ай бұрын
Congratulations Anand 🎉 I'm glad I was able to help you clear your interview. Keep learning and growing 😊
@thecodelogin6 ай бұрын
the span tag still follows the box model. the reason you described is not well enough to decline it. the problem is you don't have enough screen width to cover up the content of span then it will auto wrap to new line. if you have enough space it will be like box model. so you can say by maintaing aspect ratios of the element every element in the html is like box model.
@viraldimention23 күн бұрын
Most of the questions are useless believe me I am 12 year exp js dev
@dinesh282 ай бұрын
awesome interview, great questions and discussions.
@prakharomer77458 ай бұрын
Its fabulous never seen such interview. 🎉
@pranaykrmajee14328 ай бұрын
Here it is the simpler React version: Enjoy 😀 import React, { useState } from 'react'; const CircleIntersecting = () => { const [circles, setCircles] = useState([]); const handleScreenClick = (event) => { const x = event.clientX; const y = event.clientY; const radius = Math.floor(Math.random() * (200 - 50)) + 50; if (circles.length === 2) { setCircles([]); return; } const newCircle = { x, y, radius }; setCircles([...circles, newCircle]); if (circles.length === 1) { const firstCircle = circles[0]; const dist = Math.hypot(firstCircle.x - x, firstCircle.y - y); if (dist < firstCircle.radius + radius) { if (dist + radius
@Fahad-p2rАй бұрын
1:00 Bro sigma web development by code with harry is 🔥
@sujalchaudhari704610 күн бұрын
Agree 💯
@onlygamingsamy4 ай бұрын
i hope you will create more such raw interviews where both actually involved and think like programmer, even after 2.5 years of experience i got to know many things
@Krishcode2644 ай бұрын
10:39 by default all the elements are inline ?? i don't think so .
@mikelan98543 ай бұрын
this guy knew his stuff , great watch and good to learn.
@vamshikrishna60018 ай бұрын
Need more questions and answers on js and react.js, with real-time coding questions as in interview, great video! 👍anurag🙏
@chidrewar8 ай бұрын
one of the best interview i have ever seen, Very helpful
@a32abhishekpurohit208 ай бұрын
Instead of taking it as hypotenuse, you have to find shortest distance to between circles, compare it with the sum of both circles radii, if shortest distance is less than equal to sum of radii its intersecting, else not
@procodrr8 ай бұрын
And how will you find the shortest distance?
@a32abhishekpurohit208 ай бұрын
@@procodrr const distance = Math.sqrt(deltaX*deltaX + deltaY*deltaY) where deltaX and deltaY are mode of substraction of x,y co-oridnates. Also hypo is made of this formula.
@VaibhavSain-g9d2 ай бұрын
we need more mock interviews like this
@matifiordelli38868 ай бұрын
it was an super excellent interview, I coded at the same time as you. it is a pleasure to learn and remember knowledge this way!😊
@prateekchawla15965 ай бұрын
Really Thank you for such informative sessions Just seeing a few 10 minutes of the interview forced me to hit the subscribe button😊
@rajashreeasok545724 күн бұрын
I have learnt so much new things 🎉🎉 really loved it 😊 I'm preparing for interview and thanks for this video 📸😁
@procodrr13 күн бұрын
All the Best for your Interviews 🎉
@AmmarAmin-p5y8 ай бұрын
If we return setTimeout(.... , 10k) inside of that async func. Won't it will be in pending state for 10 second?
great video this video make me confident that i know answer to some questions it was a great way to learn and brush up my skills
@kuldeepsinghrathore23278 ай бұрын
17:45 javascript
@financewithsom4855 ай бұрын
anurag singh has very deep knowledge even he has no background in IT started as a farmer now he is pro level js guy.
@VersionSix-su2dp4 ай бұрын
For static value as the interviewer write height and width is defined previous and he know the value then he substarct only half of that circle.style.left = e.clientX-50 // it half of the total width because it take 100. Circle.style.top = e.clientY -50 as half of total height . And just append child in the document. Document.body.appenchild(circle) For dynamic value like when I don't know the what the width height of the circle so the so now we write. First we make the defined the position color and width and height(In random value this Manas we don't know); Now we append the circle in the document. Document.body.appendchild(circle) Circle.style.top= e.clientY - circle.offsetHieght/2 Circle.style.left = e.clientX - circle.offsetWidth/2; That shit if you don't value then append the circle to body to know that height and width and get value using the method of elements.offsetHeigt, elements.offsetWidth. I hope you clear this full code of full optimised and dynamic value action that take center and create a circle where you click. document.addEventListener("click", function(e){ const circle = document.createElement("div"); circle.className = 'circle' circle.style.position = "absolute"; circle.style.width = "100px"; circle.style.height= "100px"; circle.style.backgroundColor = "red"; circle.style.borderRadius = "50%"; document.body.appendChild(circle) circle.style.top = e.clientY - circle.offsetHeight/2 +"px" circle.style.left = e.clientX -circle.offsetWidth/2 +"px"
@Vishal-sy8gb6 ай бұрын
I think in the intersection of circle question... If we find the Manhattan distance between the two circle center and if its is less then equal to sum of both radius... Then we can get the answer. Formula: sqrt((x1-x2)^2 + (y1-y2)^2)
@ianski98988 ай бұрын
Why some of interviewers doesnt ask interview like this, but they ask what you do in your previous work? Any thoughts?
@manishkumarsharma65073 ай бұрын
I don't know why he wasted so much time in finding the simple logic, of finding distance between two coordinates and its diff with sum of radius, apart from this, he has good knowledge of html, css, and js and he played well with all these. Kudos!!!
@vivekvirmani86458 ай бұрын
Very helpful 👌
@dr-Jayaswal5 ай бұрын
not going to hate anyone but i think the level should be increasing for one from his / her past rather than refer to other
@codemanoranjanshorts7 ай бұрын
thanku sir aap ki vajaha se moje bhoht kuch nya siknhe ko mila
@mukul42437 күн бұрын
Very helpful for interview preparation
@procodrr10 сағат бұрын
Happy to help! Ace that interview! 💪
@shreyageek6 ай бұрын
no one ask such things. I think mostly the interviewer jump into Javascript tricky questions
@himanshuarora19108 ай бұрын
i cant understand how things are going in module scope at 1:01:47 ,,,also cant find in ur videos
@procodrr8 ай бұрын
kzbin.info/www/bejne/a2nCo5eJaqqJrrcsi=9q6kHppHsBRubJp0 Watch this video on ES6 modules
@adityabarve23738 ай бұрын
Is this correct solution for promise in react ? JS: const pendingPromise = (param) => { return new Promise((res) => { if (param) { res("Button clicked , Promise resolved"); } }); }; const resolveOnclick = () => { pendingPromise(true)?.then((res) => { console.log(pendingPromise(true), res); }); }; JSX : Resolve Promise
@randomtech59298 ай бұрын
watch chai aur code backend series . and this video was amazing , I really liked it
@tanishqjoshi76915 ай бұрын
Defer will instruct the browser to fetch the script content without blocking page render
@TopFaCTS-qr1sk5 ай бұрын
POV : When the candidate knows more than the interviewer
@procodrr5 ай бұрын
Happens 😀 By the way he learnt these things from my videos.
@JunaidShareef-j4u4 ай бұрын
Bro is just down to earth..😍😊
@parthsharma5750Ай бұрын
I gave almost 15-20 interviews but the interviewer never asked these questions.
@Parbhat_DhanukАй бұрын
I appreciate
@nd27037 ай бұрын
SIr node js bi padha do plzzzzzz, aap bohot accha padhate ho, hindi me
@whoami878285 ай бұрын
Amazing interview. After seeing this i have some question. I have never done any interview before so enlighten me a little, - Is it normal for a interviewer to help the applicant in an interview?
@narutodihargo8 ай бұрын
Great great initiative bhaiya
@socio_sapian8 ай бұрын
Audio quality is not so good. Kindly improve the quality of audio so audience can stay till end of the video. Plz chk
@chandreveersingh62116 ай бұрын
One of the best ❤
@Vedant-M8 ай бұрын
Good to see Ankush Bahuguna getting into tech.
@Zak-tc4md8 ай бұрын
can anyone mention the youtube channels that he mentioned? i know akshay saini and kevin powell. What was the third one?
@procodrr8 ай бұрын
At what time it was mentioned?
@charan39987 ай бұрын
me : beginner in javascript watching this interview. le javascript : kya re bikmangya, halwa he kya
@rahulbhatt52208 ай бұрын
sir mere ko bhi interview ka mauka de do fresher hu baki jagah toh fresher ke liye 5 saal ka experience chahiye
@BasavaRajeshwari-e1s8 ай бұрын
This is awesome bro ❤
@atharvakulkarni160124 күн бұрын
How can i appear for this mock inteview? I have a similar ReactJS interview coming up in the next week?
@riteshkamblefanclub57478 ай бұрын
sir aap plz package mention kijiye ki isko kitna milega interview ke baad plz
@editorcd8 ай бұрын
Professionals web hosting par one video
@Hidden_name18 ай бұрын
Sir why can't we are able to fill form.please respond
@bhuvaneshkadur97588 ай бұрын
sir please make a video of understanding the dom in-depth as he used those e.clientx something like that , and also debugging video , its my kind request
@datodiasamidze36814 ай бұрын
if someone understand thier english please someone translate to me :D why they pronounce D when its T?