Тёмный

#208 

Frontend Master
Подписаться 65 тыс.
Просмотров 375 тыс.
50% 1

Javascript Interview Questions
My Blogs: / rahuulmiishra
LinkedIn: / rahuulmiishra
Instagram: / allahabadi.dev
#javascript #websuccess #websecurity #html #css #frontend #frontenddeveloper #reactjs #angular #vuejs #reactremix #mobx #redux #reduxtoolkit #allahabadi.dev #rahuulmiishra #frontendmaster #coding #interviewprep #interview #javascriptinterview

Опубликовано:

 

30 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 141   
@funterban6536
@funterban6536 5 месяцев назад
wow your channel over having big series of javascript question
@1anchit
@1anchit 3 месяца назад
That is not a bug. Works correctly. If person gets 0, he is absent for exam.
@yashsolanki069
@yashsolanki069 3 месяца назад
What about he appears for the exam and did not solve any questions ? Absent and getting 0 is two different scenarios
@1anchit
@1anchit 3 месяца назад
@@yashsolanki069 there is no option for absent condition then. Absent is just not used anywhich way then why give it an option?
@yashsolanki069
@yashsolanki069 3 месяца назад
​@@1anchitif it's 0 then the marks should print 0 not absent. So we correct this by doing ?? if it's null or undefined then be say marks Absent (this is right way)
@cryptoknight9440
@cryptoknight9440 Месяц назад
Because javascript treat 0 as falsely value 😂😂😂
@CaptainAnonymous-ld5of
@CaptainAnonymous-ld5of 4 месяца назад
Sir please do leetcode questions
@rahuulmiishra
@rahuulmiishra 4 месяца назад
after sometime
@shraj340
@shraj340 5 месяцев назад
marks.toString() can solve it with the or operator
@ProgrammingBoy
@ProgrammingBoy 4 месяца назад
Correct 👍
@shreyakdev
@shreyakdev Месяц назад
That means ?? operator considers 0 as number instead of falsy value as || operator..so prints 0
@xyzatin
@xyzatin 2 месяца назад
Wtf! Ye bug kaise hua? condition hi aise likhi hai. 0 marks ho toh Absent show krdo...this is not bug. Stop it.
@akshay_punia00
@akshay_punia00 Месяц назад
But this is not a bug actually. If you want someone got zero in exam mark absent, it's totally depends on use case.
@kshitijtidke6858
@kshitijtidke6858 2 месяца назад
Nullish coalescing operator (??)
@manjunathsingh8925
@manjunathsingh8925 3 месяца назад
But it's not a bug. It's working as implemented.
@akj3388
@akj3388 2 месяца назад
In this example what would && operator do?
@billionair_519
@billionair_519 2 месяца назад
&& operator use only for true conditions not for these type of conditions.
@aakashsinha8117
@aakashsinha8117 Месяц назад
would consider it as a feature and move on :)
@biswajeetmishra5420
@biswajeetmishra5420 Месяц назад
Sir where can I get more questions like this to practice....@rahuulmiishra
@vanshkhanna515
@vanshkhanna515 24 дня назад
Marks 29 Marks Absent Marks 46
@facts14301
@facts14301 21 день назад
}; semicolon kon lagayega
@vikaskyatannawar8417
@vikaskyatannawar8417 2 месяца назад
0 aane se acha, Absent bolna zyaada acha hai 😂
@tara730
@tara730 5 месяцев назад
nice
@itz.weired3755
@itz.weired3755 3 месяца назад
But in this code the type is also an issue
@e889.
@e889. 2 месяца назад
JS is dead better to learn Java
@nikhiltiwari7352
@nikhiltiwari7352 2 месяца назад
Bro can you tell me the best book to learn javascript, i am not a complete beginner but i want a book to which i can refer till i reach that advanced stage
@rahuulmiishra
@rahuulmiishra 2 месяца назад
you don’t js yet by - kyle simpson this what you need.
@stephenwilson4931
@stephenwilson4931 4 месяца назад
Itna aasan interview wipro ka hi ho skta h 😂😂
@hirenahir76200
@hirenahir76200 4 месяца назад
Easy?💀
@zeviusalpha1943
@zeviusalpha1943 3 месяца назад
ha na bhai​@@hirenahir76200
@DashingChannel
@DashingChannel 3 месяца назад
ye ez kaha se hai?
@cykoravi
@cykoravi 9 дней назад
Its easy🎉
@iambhavinpatel
@iambhavinpatel 10 дней назад
awsm
@muhazahmed5836
@muhazahmed5836 3 месяца назад
Thts not a bug
@theannonymous1430
@theannonymous1430 3 дня назад
Not a bug it's simple programming logic 😂
@rahuulmiishra
@rahuulmiishra 3 дня назад
simple programming logic which caused the bug
@yogeshdevaggarwal
@yogeshdevaggarwal 5 месяцев назад
concept sikha rahe interview question ke naam pe 😂😂
@morrazzo4432
@morrazzo4432 Месяц назад
After overcoming all the odds in the interview , we realise our package is 2.33 LPA 😢
@rahuulmiishra
@rahuulmiishra Месяц назад
have patience bro… just do 2 switches and after 2 years it can easily reach 10+
@morrazzo4432
@morrazzo4432 Месяц назад
@@rahuulmiishrarandi nimo tai with tax 💀☠️
@DEVENDRA-r3p
@DEVENDRA-r3p 2 месяца назад
falsy ❌ false✅
@Meow-fx1ws
@Meow-fx1ws 28 дней назад
Bina full video dekhe: 0 also means false and || means if first not exists return second value So message will be absent
@rahuulmiishra
@rahuulmiishra 28 дней назад
bina comment padhe…. good job 👍🏼
@Meow-fx1ws
@Meow-fx1ws 28 дней назад
@@rahuulmiishra Thanks sir, You are doing a great job
@VikashSharmaVS
@VikashSharmaVS 2 месяца назад
jhootha …… ye bakwas question koi nahi poochta
@rahuulmiishra
@rahuulmiishra 2 месяца назад
mat dekh na first
@nitinbhattacharyya8784
@nitinbhattacharyya8784 Месяц назад
Lol got this exact bug in my code yesterday and learned why this was happening
@bishalacharya2582
@bishalacharya2582 3 месяца назад
I don't believe this is an interview question 😂. I have not given any interview yet but I solved it while going through the snippet for the first time so surely interviews questions can not be this easy, right ?
@rahuulmiishra
@rahuulmiishra 3 месяца назад
if this seems easy to understand, u r on right path. something that is easy for you, might be tough for other and vice versa.
@bishalacharya2582
@bishalacharya2582 3 месяца назад
@@rahuulmiishra actually imo this program is really easy for someone who has learn conditional operator. I learned C while being in Highschool so I just noticed ll which is logical OR , implying either of the two conditions will make the whole expression true. Tbh I feel like you have to learn C to be a real programmer who knows what's actually happening behind the scenes Edit: as you said something easy for me may be difficult for others so I hold a strong believe that to be a good programmer, not a developer, everyone must know C even it's just the surface level.
@riteshchauhan3634
@riteshchauhan3634 6 месяцев назад
It is also know as short circuting in which if 1st expression is true then 2nd expression will never be executed. And same things also works on and operator in which if 1st expression is false then 2nd expression will never be executed
@midhungopi4736
@midhungopi4736 5 месяцев назад
Thanks...I don't know that it has a fancy name I thought if it's an OR operator and it's true then checking the 2nd condition doesn't make any sense irrespective of the result it's any way output true as the first one is true that's why the compiler being smart skip the 2nd condition and returns true 😅
@BruceWayne-f7u
@BruceWayne-f7u 3 месяца назад
i thought that would return true or false, wjy did it return the actual value ?
@Pointedbill
@Pointedbill 2 месяца назад
Its like the Ternary operator of C?
@rahuulmiishra
@rahuulmiishra 2 месяца назад
yes
@enter.netinfinity6136
@enter.netinfinity6136 3 месяца назад
message = marks+1 || absent Log(message-1) Isse bhi resolve ho jayega
@HfGf-ss2gm
@HfGf-ss2gm 13 дней назад
❤❤❤❤❤
@vishalk568
@vishalk568 2 месяца назад
Ye kon sa code runner h ?
@CARNAGE_GAMMING
@CARNAGE_GAMMING 2 месяца назад
def helloworld(str): print(str) helloworld("print") 😊😂
@DeveloperJishan
@DeveloperJishan Месяц назад
i am 13 years old i know html css js and python what should i learn next sir
@rahuulmiishra
@rahuulmiishra Месяц назад
stop learning new things now…. you have learnt enough that will help u to build something. now build something.
@DeveloperJishan
@DeveloperJishan Месяц назад
@@rahuulmiishra Um ok what should i build
@RakeshSingh-vl2mz
@RakeshSingh-vl2mz 5 месяцев назад
Sir ye bug nhi hai shortcuiting hai Agr || use krte time koi flasy value mil jata toh immediately return krdeta
@rahuulmiishra
@rahuulmiishra 5 месяцев назад
yes its not a bug… but iska galat use bug introduce kr skta hai… jo maine video me show kia hai
@kushalkumarvlog
@kushalkumarvlog 4 месяца назад
But when you use ?? instead of ||, Below case will fail: showMessage(``); // it won't give you absent, which should be the logical output.
@RakeshSingh-vl2mz
@RakeshSingh-vl2mz 4 месяца назад
I am getting absent ​@@kushalkumarvlog
@RakeshSingh-vl2mz
@RakeshSingh-vl2mz 4 месяца назад
​@@kushalkumarvlognullish coalescing operator only works with null and undefined except it all are true So u will get absent
@cosif3001
@cosif3001 4 месяца назад
It's not a logical question Indian service based company always ask you nonsense questions 😢😢
@vivekvivek-nn1xo
@vivekvivek-nn1xo 4 месяца назад
Agree
@shivshekhawat5253
@shivshekhawat5253 2 месяца назад
this is not a bug, but a concept in js called short-circuiting || will short circuit when encountering true and && will short circuit when encountered with false, there is also ?? operator that short circuits for nullish values
@bestchoice7431
@bestchoice7431 4 месяца назад
How have you got the question that is asked by wipro?
@BruceWayne-f7u
@BruceWayne-f7u 3 месяца назад
the output is wrong, according to both gpt and gemini, absent would be returned only if the left side value is null or undefined, here 0 is neiether null nor undefined making it return 0.
@rahuulmiishra
@rahuulmiishra 3 месяца назад
please don’t trust ai blindly. run this code in console and check
@BruceWayne-f7u
@BruceWayne-f7u 3 месяца назад
@@rahuulmiishra no, check mdn documentation, nullish coescaling operater (??) returns rhs value only n only if lhs value is null or undefined. the point of ?? operater is to propogate || or operater functionality while only considering null n undefined as falsy value, values like empty string, 0 etc are still considered truthy value in ?? operater
@rahuulmiishra
@rahuulmiishra 3 месяца назад
@@BruceWayne-f7u I am telling the same, what's issue here.
@BruceWayne-f7u
@BruceWayne-f7u 3 месяца назад
@@rahuulmiishra you passed 0 as paremeter in the function which represents lhs vlaue in expression, and is NOT null or undefined, so technically it should return 0 instead of absent string.
@muhammadmuhaddis8938
@muhammadmuhaddis8938 Месяц назад
Now i see the benefit of eloquent JavaScript
@Yaduvanshi-nw3yr
@Yaduvanshi-nw3yr 5 месяцев назад
Agr parameter me hi agr absent default value de de to
@pjgaming8135
@pjgaming8135 4 месяца назад
Bhai jitna dip mein jaaoge utna jyada khajana milega logic ka
@ankeshkapil3129
@ankeshkapil3129 4 месяца назад
So just leave javascript
@tony-st7wb
@tony-st7wb 5 месяцев назад
Hello sir How long it does take to complete android app development course
@abhaytomar2270
@abhaytomar2270 Месяц назад
For JavaScript tutorial your channel is best ❤❤❤love you
@gaurv_rwt
@gaurv_rwt 5 месяцев назад
ye bug thodi hai 😂
@rickeyupadhyay6898
@rickeyupadhyay6898 5 месяцев назад
Bug hi to hai bhai agar kisi ko 0 marks aaye iska matlab ye thodi naa ki vo absent hai 😂😂
@rohitkharche7562
@rohitkharche7562 5 месяцев назад
If recruiters are asking questions about javascript errors which are to be visible with right in the editor using typescript. This is missing the point of reliability.I think they should ask questions based on typescript type system
@rahuulmiishra
@rahuulmiishra 5 месяцев назад
not evenone uses typescript
@48_subhambanerjee22
@48_subhambanerjee22 Месяц назад
Damn.. this is interesting
@Dnyaneshwar_Mulay
@Dnyaneshwar_Mulay 2 месяца назад
Wipro itne easy Q puchti hai😅
@rahuulmiishra
@rahuulmiishra 2 месяца назад
bhai interview ye check karne k lie hota h ki tum kaam kar paoge ya nhi… cheeze aatin hain ya nhi. tumko interview me fail karwana motive nhi hota
@Dnyaneshwar_Mulay
@Dnyaneshwar_Mulay 2 месяца назад
​@@rahuulmiishraohh must✅
@sudhanshyt
@sudhanshyt 3 месяца назад
ye maine python me kiya tha aaj
@kriptonian0
@kriptonian0 5 месяцев назад
Tbh it's not a bug
@kshitijshinde9
@kshitijshinde9 2 месяца назад
Ye toh boht basic hai
@sarveshkumarpandey5333
@sarveshkumarpandey5333 5 месяцев назад
Gpt se kar lo , developer berojgaar ho gye , RU-vid Wale ban gye
@rahuulmiishra
@rahuulmiishra 5 месяцев назад
aisi soch rakhne wale berozgar hai bhai..
@uzair7882
@uzair7882 4 месяца назад
It is short circuiting using or
@ProgrammingWithExx
@ProgrammingWithExx 2 месяца назад
nice
@CodeWithInnu
@CodeWithInnu 2 месяца назад
to great
@imranali-kn6mv
@imranali-kn6mv 25 дней назад
Nice
@danyalhabib286
@danyalhabib286 5 месяцев назад
JS is really a toy language 😂
@shreyasd6794
@shreyasd6794 5 месяцев назад
Amazing
@IndraMJha
@IndraMJha 5 месяцев назад
What's the use of Absent in that statement?
@SasukeUchiha-im4oz
@SasukeUchiha-im4oz 2 месяца назад
In JavaScript, ?? is the nullish coalescing operator. It returns the right-hand operand if the left-hand operand is null or undefined, otherwise it returns the left-hand operand. Here's how it works: JavaScript const x = null; const y = "Hello"; console.log(x ?? y); // Outputs "Hello" because x is null. const a = 0; const b = "World"; console.log(a ?? b); // Outputs 0 because a is not null or undefined. Key points: It is useful for providing default values when a variable might be null or undefined. It is different from the || (OR) operator, which would return the right-hand operand for any falsy value on the left (like 0, "", false).
@shivamchaturvedi3528
@shivamchaturvedi3528 Месяц назад
Great
@SunBloomings
@SunBloomings 2 месяца назад
Wow your channel is gem
@rahuulmiishra
@rahuulmiishra 2 месяца назад
thanks a lot ❤️
@rajtiwari2308
@rajtiwari2308 4 месяца назад
So Bug also means logical error 😢
@rahuulmiishra
@rahuulmiishra 4 месяца назад
thats what causes the bug
@hackerboy4802
@hackerboy4802 5 месяцев назад
i think it was ver very easy lmo
@imahe07
@imahe07 5 месяцев назад
Sir 2 din se lexical scope padh raha hu kuch samjh nhi aa raha h Function scope aur lexical scope me difference kya h aur Lexical kya h
@rahuulmiishra
@rahuulmiishra 5 месяцев назад
lexical word ka matlab hota hai fixed. and lexical scope means a scope which is fixed. ab ek scope fixed kab hota hai? jb hum code likhte hai. code likhne k time pe hi jo scope variables ka hota hai wo lexical scope hai. lexical scope code likhne k time pe picture me aata hai… lexical scope k andar function scope global scope ye sab aate hain.
@imahe07
@imahe07 5 месяцев назад
You are truly frontend master sir 4,6 line me clear kar diya sb kuch Thanks❤ thanks a lot❤
@RichyRich18
@RichyRich18 22 дня назад
This man is great 👍
@rahuulmiishra
@rahuulmiishra 22 дня назад
u r too 🥳
@relightgaming7155
@relightgaming7155 2 месяца назад
helpful
@santoshvarma6158
@santoshvarma6158 4 месяца назад
Default value works too
@webdesigninspire1372
@webdesigninspire1372 5 месяцев назад
Vscode ka theme kaunsa hai?
@dhruvparekh5599
@dhruvparekh5599 5 месяцев назад
It's not a vs code editor
@sudarshanpatekar5632
@sudarshanpatekar5632 2 месяца назад
Very good
@shahyash589
@shahyash589 5 месяцев назад
Any resources to learn JavaScript ?
@sunnykalita675
@sunnykalita675 5 месяцев назад
Namaste Javascript by Akshay Saini
@gautam_editsz
@gautam_editsz 3 месяца назад
❤nice bhiya
@shashanksingh4903
@shashanksingh4903 3 месяца назад
@himanshu7271
@himanshu7271 3 месяца назад
Nice 🎉
@sanjayreddy7948
@sanjayreddy7948 5 месяцев назад
We want more
@GhostSS168
@GhostSS168 6 месяцев назад
Sir please tell me agar mere ko ye question bilkul bhi samajh nahi aa rahe to main kese or kaha se shuru karu please reply sir
@riteshchauhan3634
@riteshchauhan3634 6 месяцев назад
Bro don't worry just start from easy-2 questions then after try to go intermediate and so on...
@GhostSS168
@GhostSS168 6 месяцев назад
@@riteshchauhan3634 but it seems impossible should i do some DSA course and then try leet codding ?
@riteshchauhan3634
@riteshchauhan3634 5 месяцев назад
Yeah sure bt it depends on you that if u r learning webdev then don't go for advance questions bcoz for beginners students there is no need of leetcode Bt of u don't want to do webdev then u can...
@GhostSS168
@GhostSS168 5 месяцев назад
@@riteshchauhan3634 sir thanks again for replying and i want to go in webdev field my dream is to create applications that ever i dream of but for cracking interview and all i need that DSA skills right ?
@riteshchauhan3634
@riteshchauhan3634 5 месяцев назад
​@@GhostSS168 Yes for big MNC company it requires DSA bt 2024yr scenario is totally different they ask not only DSA bt also web u can say that they want everything from u So focusing on DSA all the time is bad I suggest u ki u can do both parallely.
@Meisterilyas_333
@Meisterilyas_333 4 месяца назад
@ArvindSingh-wj7vy
@ArvindSingh-wj7vy 5 месяцев назад
Thanks ❤
@mhghazna
@mhghazna 5 месяцев назад
Thanks 🎉
@udaytewary3809
@udaytewary3809 5 месяцев назад
Maja aa gya bhaiya pehli baar aisa gsap ka use kiya kyuki mai khud pehli baar gsap ke baare me padh raha hu lekin maja aa gya Aur pareshan mt ho bhaiya aapke true students hmesha apke sath haa aur rahenge aur wo sb apki reach bdhane me help bhi karenge
@Nilesh-u3q
@Nilesh-u3q 5 месяцев назад
If we simply remove "Absent" and instead of that put 0 or null it also, I am Database Developer, I don't have knowledge of java😢😢😢😢😢😂😂😂😂😂
@CloudMadeEasy
@CloudMadeEasy 4 месяца назад
Nice 👍
@sharikkumar8581
@sharikkumar8581 29 дней назад
Wipro ke loye bhi preparation karna pad rha hai kya?
@rahuulmiishra
@rahuulmiishra 29 дней назад
😂