• Saturday , 4 April 2020

Top Tricky JavaScript Interview Questions and Answers

Code Canyon



Cracking JavaScript coding Interview by learning difficult JavaScript interview Questions. commonly Asked JavaScript Interview Questions.

Please be my patreons on patreaon
* https://www.patreon.com/techsith

Follow me for technology updates
* https://facebook.com/techsith
* https://twitter.com/techsith1

Help me translate this video.
* http://www.youtube.com/timedtext_video?ref=share&v=3qnrouysbG8
Note: use https://translate.google.com/ to translate this video to your language. Let me know once you do that so i can give you credit. Thank you in advance.

Original source

3d Ocean

Related Posts

37 Comments

  1. Bhan Prakash
    May 6, 2019 at 17:35

    Inside NaN they are different like
    57sgt674fyj&6&(6_: === gi3754_76ticc58&
    That's why they always gives false even with itself

  2. SAYED ABDUL KARIM
    May 6, 2019 at 17:35

    var arr = [2,3,42,4,5,4,5,6,7,2,3]
    , if we have an array like this
    we cannot get expected results with '<' or '>' operator

  3. Sodere Ethio
    May 6, 2019 at 17:35

    it's a bit unfair and stupid asking such granular details almost no one uses on job interview, unless you are interviewing a senior developer.

  4. Sameer Siddiqui
    May 6, 2019 at 17:35

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

  5. Anupama RK
    May 6, 2019 at 17:35

    In the video 12.17, if b is a global variable. Why it didn't print at first time. Please reply back

  6. Erez T
    May 6, 2019 at 17:35

    If a programmer asks this "trick question" in an interview, I get up and leave.
    All to the fact that NO ONE will dare write this type of shit and commit this code, it's unreadable, unrelated and confusing, if you would like to return (-1) from your array, there are a myriad of SIMPLE AND READABLE ways to do it.
    The only thing I could think he's trying to gain out of this is him trying to show me that he knows how to be a good QA, nothing more.

  7. saransh dhyani
    May 6, 2019 at 17:35

    After reading javascript
    Aby kya hai ye isne to programming k fundamentals ko hi palat diya

  8. John Doe
    May 6, 2019 at 17:35

    8:44 – wrong. MAX_VALUE multiplies to Infinity, not 0

  9. Juan2003gtr
    May 6, 2019 at 17:35

    Excelent video! The only thing is that the one with the iife, if you console log a in the chrome console it gives you [-1: -1] instead of the error you show!….and b it gives 100 indeed…did something changed in the language? Try it in the new chrome!

  10. 7soapte
    May 6, 2019 at 17:35

    05:25
    I don't seem to get it to work by using return a > b.
    Weird thing is that if I return a – b then it works properly. Am I doing something wrong?
    Thank you in advance.

    const arr = [1, 2, 15, 30, 5, 45, 7];

    console.log(arr.sort((a, b) => {
    return a – b;
    }));

  11. Brandon Robinson
    May 6, 2019 at 17:35

    I couldnt find the tutorial on negative indexes. Could someone please point me to it?

  12. Sreenath Reddy
    May 6, 2019 at 17:35

    I loved it, Can i have quations like this of angularJS 1.x as well?

  13. My Smart Followers
    May 6, 2019 at 17:35

    very nice…

  14. Anand Parmar
    May 6, 2019 at 17:35

    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 🙂

  15. Mahesh Nandam
    May 6, 2019 at 17:35

    Thanks, techsith.

  16. Myles Gmail
    May 6, 2019 at 17:35

    I tweeted this video! Ty

  17. Bakuta Nathan
    May 6, 2019 at 17:35

    As a primarily c++ programmer, I am thoroughly confused 🙂

  18. syed faizan
    May 6, 2019 at 17:35

    11:53 how did the '6' come in?

  19. Feng Mu
    May 6, 2019 at 17:35

    null===null give you true,NaN==NaN give false

  20. inspektorkludge
    May 6, 2019 at 17:35

    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

  21. karimulla shaik
    May 6, 2019 at 17:35

    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;

    }));

  22. Ben Smith
    May 6, 2019 at 17:35

    I like that interview series. thanks!

  23. prabhu kadode
    May 6, 2019 at 17:35

    sir , i have one question. Actually i was asked this question in interview. the question is about converting normal javascrpt function to call back function… so question goes like this,…
    function aa(){
    return 1;
    }
    var res = aa();

    so they wanted me to convert above function into call back function.. how to do sir ? plz help

  24. Antonio Espinosa
    May 6, 2019 at 17:35

    i love your accent it's very clear!

  25. Kyle Amoroso
    May 6, 2019 at 17:35

    That Number.MIN_VALUE question got me! That really did stump me! Thank you for showing us these difficult problems!

  26. Jorge Nicolás Laverde Peña
    May 6, 2019 at 17:35

    But in the sort example when the array is longer than 10 elements doesnt work it.
    prefer pass in the call back return a-b

  27. Muhammad Qamar
    May 6, 2019 at 17:35

    it would be FALSE

  28. Anupam Singh
    May 6, 2019 at 17:35

    👍 cool experiments with js. thank you sir.

  29. Dev O'lee
    May 6, 2019 at 17:35

    I really enjoy these series. Thanks you sir!

  30. Sarada Tadepalli
    May 6, 2019 at 17:35

    cont x=[1,2,3];
    x.indexOf[10000] will be -1 as you said but when I tried doing that it's getting undefined.

  31. karthik matreddy
    May 6, 2019 at 17:35

    === compares value and data type right (value same)(type of nan is number so data type also same)value same data type same it will returns true right

  32. 10my_Rocks
    May 6, 2019 at 17:35

    Hi,

    Could you tell me Y this result is coming in my console?
    var i = Number.MIN_VALUE;
    console.log(i);
    console.log(i+i);
    console.log(i-i);
    console.log(i*i);
    console.log(i/i);

    VM173:2 5e-324
    VM173:3 1e-323
    VM173:4 0
    VM173:5 0
    VM173:6 1

  33. Beaver Joe
    May 6, 2019 at 17:35

    video is great but HR would not ask so many tricky and meaningless question for one student. Such question based on concepts but far away from the real world

  34. akab211
    May 6, 2019 at 17:35

    Javascript is awesome!

  35. André Rothweiler
    May 6, 2019 at 17:35

    I feel like I'm applying to be a Mathematician and not a Developer lol

  36. ManOnHorizon
    May 6, 2019 at 17:35

    11:05 – the weirdest part is if you console.log 17 fives it will return 55555555555555550.
    Shouldn't it have "..60" on the right?
    And console.log(44444444444444444); gives us this: 44444444444444450.
    Doesn't make any sense =)

  37. Rishanth Kanakadri
    May 6, 2019 at 17:35

    NaN compared to anything is always false.However, Here comes the interesting stuff (typeof null is an Object and type of Object is also Object. When you do a "==" with both of them, it will return you a false.

Leave A Comment

You must be logged in to post a comment.