Top Tricky JavaScript Interview Questions and Answers

preview_player
Показать описание
Cracking JavaScript coding Interview by learning difficult JavaScript interview Questions. commonly Asked JavaScript Interview Questions.

Please be my patreons on patreaon

Follow me for technology updates

Help me translate this video.
Рекомендации по теме
Комментарии
Автор

The one you mentioned for sorting is not working. Instead of returning a<b or a>b it should be a-b or b-a in the call back function. Thank you for this video :)

anandparmar
Автор

it is worth mentioning that when we use "use strict" it will throw the error (example with IIFE)

mendelson-dev
Автор

Thank you so much for making the videos and helping the web developers careers.
For some reason, the sorting of integers with callback didn't work with a<b, b<a, instead works with a-b, b-a.
console.log(arr.sort((a, b) =>
{
return b-a;
}));

karimullashaik
Автор

These are JS interview questions straight out of hell 🔥 😂
Thank you so much for your super insightful and quick videos! I love them

DevDoodle
Автор

For the sorting one, the comparison is not working because the function looks for a number value, not a boolean :(

x.sort((a, b) => (a-b)) works though!

Thanks for this though and I love your videos

inspektorkludge
Автор

If an interviewer asks you these questions, just leave the interview because there are tonnes of things to ask about code management, design patterns and consideration of scalability.

HearItFirst
Автор

Your videos are great. They are short but covers a lot. Keep doing the great work 👍🏻

shubhamarora
Автор

NaN compared to anything is always false, even comparing to itself!

frontend-coder
Автор

Just a note as a mathematician - 0/0 is undefined mathematically, rather than infinite (think: anything multiplied by 0 is 0, but anything divided by 0 is infinite, so 0/0 doesn't have any value). When we have i = MIN_VALUE, i*i is 0 because i*i is less than i, so js makes it zero (as appears to be the definition of MIN_VALUE). And then i/i is 1 not because i is small, but just because anything divided by itself is one (except 0/0).

owenwood
Автор

I am too late with homework, but NaN === NaN is false because NaN is typeof Number which is an object (not primitive). When you compare objects in JavaScript, you are determining if 2 objects are the same instance of specified object type.
So you are comparing 2 different instances of Number object.
For example undefined === undefined is true, because undefined is primitive type (you are just comparing values).

And seems like my answer is wrong 😅

iponik
Автор

The one you mentioned for sorting is not working. Instead of returning a<b or a>b it should be a-b or b-a in the call back function.

SonuKumar-gnhm
Автор

Thank you so much
We wanna a separate Playlist to all of the Tricky Javascript interview questions videos

osamatalaat
Автор


I never seen this type of questions.
How do you find such a type of questions like this? This is awesome.🙂👍🏻

deepakgour
Автор

2:31 index doesn’t mean to find the value. Its like find me the location of that value.

SameerUnt
Автор

When you said 0/0 is infinite, it's not true. It's always NaN in JavaScript. And it's not infinite in Mathematics either. Your videos are great source of learning. Thank you for making time and making these ones 🙂.

carefree_ladka
Автор

I really enjoy these series. Thanks you sir!

devolee
Автор

Nice video. Thanks for your hard work and time.

kamal-ahmed
Автор

Thanks for the Q&A!! Really love the videos. For the problem [1, 2, 3] + [4, 5, 6] how come the "[" and "]" were ignored but not the commas ", " during concatenation?

dantegreyson
Автор

Great Video as always :) Thanks for making JavaScript so easier to learn :) .

Harshavardhan-gdeu
Автор

I feel much fun, enthusiastic while attempting these interview questions.Awesome stuff

naveenreddydepa
visit shbcf.ru