Tricky JavaScript Interview Questions and Answers

Sdílet
Vložit
  • čas přidán 11. 02. 2018
  • Hard JavaScript Interview Questions and their possible answers ( cracking difficult coding interview questions )
    For more interview questions checkout
    *www.fullstack.cafe/?...
    Please be my patreons on patreaon
    * / techsith
    Follow me for technology updates
    * / techsith
    * / techsith1
    Help me translate this video.
    * czcams.com/users/timedtext_vide...
    Note: use 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.
  • Věda a technologie

Komentáře • 490

  • @charlesbaldo
    @charlesbaldo Před 5 lety +26

    Thank you, many times on an interview it becomes obvious the interviewer watched these videos too.

  • @nasriddinbekbektemirov5796
    @nasriddinbekbektemirov5796 Před 2 lety +15

    Honestly, I am happy that I found your tutorials. Now I am feeling a little bit comfy so I can prepare for the interview without worries

  • @journiqeducacao91
    @journiqeducacao91 Před 2 lety

    I've been watching u for a while now, and your didactics (and thumbnails) are the best. Subscribed!

  • @PrashadDey
    @PrashadDey Před 6 lety +1

    Great teaching! I have been searching this kind of videos for a long time. Thanks.

  • @vikrantsingh47
    @vikrantsingh47 Před 5 lety +24

    this was really helpful. i am using javascript for many years but never knew of so many features like freeze and seal

    • @fida
      @fida Před 4 lety +5

      you proved that .. those are really useless

    • @BobbyBundlez
      @BobbyBundlez Před 4 lety +1

      @@fidaLMFAO yeah they sound really dangerous tbh... why would i ever wanna make something completely immutable

  • @arcosd63
    @arcosd63 Před 2 lety +1

    Great video! You're a very good instructor and easy to understand as well.

  • @gyaneshsaikhedkar1536
    @gyaneshsaikhedkar1536 Před 4 lety +1

    Dude you killed it ... Thank you so much for the tutorial!!

  • @MrB_eastt
    @MrB_eastt Před 5 lety +3

    Thank you so much for the video... helped me a lot.

  • @roshnikutty4252
    @roshnikutty4252 Před 6 lety

    Awesome techsith!! This is very helpful.

  • @rishabhchopra883
    @rishabhchopra883 Před 2 lety +1

    Great video. Each question taught me a concept I barely knew. Thanks for this gem !!!

  • @davidsimoes6248
    @davidsimoes6248 Před 2 lety +2

    Great class and very well explained.
    Please keep this channel because I´m sure It has been helped a lot of developers which try learning more each single day like me.
    Thanks

  • @scorpio9ification
    @scorpio9ification Před 6 lety

    Dude I love you, please keep these going

  • @MP-mh1tu
    @MP-mh1tu Před 3 lety +11

    This man is capable of explaining things well in a simple way, the way few people do. Thank you, sir.

  • @shibiyazhini8692
    @shibiyazhini8692 Před 4 lety

    Thanks for this amazing video.. I was eagerly waiting for next next questions !!!!

  • @shyarxelil1987
    @shyarxelil1987 Před 6 lety

    Thanks for those amazing videos!!

  • @philsitumorang
    @philsitumorang Před rokem

    Thank you so much for these tricky things! Reallly useful.

  • @avr9066
    @avr9066 Před 6 lety +4

    Nice one. Thank you for uploading

  • @ZeDon140
    @ZeDon140 Před 4 lety

    Cool video. Thanks for the information!

  • @VinothKumar5403
    @VinothKumar5403 Před 6 lety

    as usual awesome video from techsith..keep doing your great job sir.

  • @surferbum618
    @surferbum618 Před 6 lety

    Thanks for the video. It's really helpful.

  • @rodiaz2709
    @rodiaz2709 Před 4 lety

    I loved this video, thanks !!

  • @priyanshubhardwaj2158
    @priyanshubhardwaj2158 Před 3 lety +3

    This vid was meant to subs both your channels. Thanks a ton!

  • @bitannath3515
    @bitannath3515 Před 4 lety

    Thanks a lot techsith!

  • @user-rb3gj8mq1j
    @user-rb3gj8mq1j Před 6 lety

    Thank you very much for sharing I really appreciate it.

  • @gummiglas5571
    @gummiglas5571 Před 2 lety

    these questions are so good, they give you a deeper understanding of javascript

  • @laxmikantnimbalkar6512

    Thanks, I learnt new methods from this session.

  • @RM-cw1ix
    @RM-cw1ix Před 3 lety

    I'm about to watch every video you have, this is amazing!!

    • @Techsithtube
      @Techsithtube  Před 3 lety +1

      Glad you like them! Thanks for watching!

  • @subhasism1890
    @subhasism1890 Před 6 lety +1

    Great video sir.. Please keep posting such contents

  • @EdgarGarcia-jo5qp
    @EdgarGarcia-jo5qp Před 4 lety +1

    For 3:00 question, I think in this solution that works for the input provided:
    var nums = [1,2,2,3];
    nums.splice(2,1);
    console.log(nums);
    I know it looks a bit silly but, hey, I got the answer. Obviously, if there is more than one duplicate, then the Set works fine.

  • @sidneysouthfield844
    @sidneysouthfield844 Před 3 lety +7

    8:43 - me at my homie house.

  • @hiteshlalwani939
    @hiteshlalwani939 Před 4 lety

    Thank you so much sir for these fantastic questions this helps me a lot

  • @hans-detlefbrix8004
    @hans-detlefbrix8004 Před 5 lety

    brilliant.....thanks a lot.... you are amazing !!!

  • @elEntrampe
    @elEntrampe Před 5 lety

    great info, I learn I lot from this.

  • @ogedaykhan9909
    @ogedaykhan9909 Před 3 lety

    This video was amazing!

  • @nirajkumarpatel6173
    @nirajkumarpatel6173 Před 2 lety

    a good set of questions well explained ty @techsith

  • @agilewriters2233
    @agilewriters2233 Před 5 lety +1

    Very cool stuff!

  • @vidyashevale2904
    @vidyashevale2904 Před 4 lety +2

    Very important tutorial for fresher as well as experience person

  • @alokranjan476
    @alokranjan476 Před 5 lety +1

    Very nice video sir.
    Thanks a lot.

  • @kramudu
    @kramudu Před rokem

    Very useful information!

  • @andriikozubenko
    @andriikozubenko Před 5 lety

    It was amazing, thank you

  • @sivaprakashv6095
    @sivaprakashv6095 Před 6 lety

    Awesome ....really helpfull and thanks lot....

  • @artemshapilov668
    @artemshapilov668 Před 6 lety

    Interesting! Thanks, man

  • @Aj-cf6zw
    @Aj-cf6zw Před 5 lety +3

    Really need to thank you for a great in-depth video , i attended a client interview and i was able to answer it because of this .

  • @mohitfinelines
    @mohitfinelines Před 3 lety

    Oh damn this is so tricky, then I think there should be many more tricks to ask these kind of questions. Thanks to Techsith

  • @milindkhadse556
    @milindkhadse556 Před 2 lety

    Helpful tutorial thank you

  • @danielenocito5080
    @danielenocito5080 Před 2 lety

    Thank you! amazing

  • @sureshmg6786
    @sureshmg6786 Před 4 lety +2

    Day by day am becoming a pro developer watching your videos :)

  • @thedeveloper4207
    @thedeveloper4207 Před 5 lety +112

    If you want to crack these questions then just ask the interviewer where he has used such scenarios. You'll be instantly selected

    •  Před 5 lety +12

      I'll add it to my *How to look smart in an interview* trello card, thanks!

    • @pa9351
      @pa9351 Před 5 lety +15

      The point is not to use it, the point is that as a senior you should be aware of the dangers of using tricky codes like this and stop others for doing something like 5 < 6 < 7 even if it works

    • @anthonya606
      @anthonya606 Před 4 lety +26

      I been denied on the last round of interview with CTO because of this answer. Everything was great until he decided to gave me a logical puzzle "You need to measure exactly 6 liters of water. But you only have a 4-liter and a 9-liter bucket. How can you do this?" I asked him "How often you guys are measuring water here with buckets" and been rejected right away...

    • @weblogic7723
      @weblogic7723 Před 4 lety +26

      @@anthonya606 Better off not working for them. Too egoistic if they cant even take a simple joke.

    • @Daniel_WR_Hart
      @Daniel_WR_Hart Před 4 lety +5

      @@anthonya606 The thing being measured is irrelevant, they just wanted to test your problem solving skills. Although if you clarified that you were joking and still willing to try but they didn't want to hear it, then yea fuck 'em.

  • @amitmaharana9228
    @amitmaharana9228 Před 3 lety

    Awesome video sir. Thank you

  • @andrewdeiak6871
    @andrewdeiak6871 Před 3 lety

    Very useful!

  • @srikanthmothkuri2327
    @srikanthmothkuri2327 Před 5 lety +1

    i appreciate ur effort

  • @zxxxaxxxixxxnxxx
    @zxxxaxxxixxxnxxx Před 4 lety +1

    This video is a goldmine for a CS freshy

  • @ramnathan4236
    @ramnathan4236 Před 4 lety +1

    Awesome Sir!!

  • @ugenegurung3829
    @ugenegurung3829 Před 6 lety

    Thank you for this.

  • @shailendrapathak5700
    @shailendrapathak5700 Před 5 lety

    I subscribed your channel..keep the good work 👍

  • @RethinkingUI
    @RethinkingUI Před 5 lety

    Superb. Thanks Sir. Can you please do a video on typescript and es6 interview questions?

  • @poonamKumari-vl9yj
    @poonamKumari-vl9yj Před 5 lety

    Owsome video sir. Please make more much video.

  • @robitops1547
    @robitops1547 Před 4 lety

    I really enjoy this tutorial,

  • @gouravkhator
    @gouravkhator Před 2 lety

    If we need a revision of JavaScript, we watch your videos and interview questions.. Thank you so much

  • @DamianNAudio
    @DamianNAudio Před 4 lety

    Reason behind "arguments" not working with arrow functions is that they take the scope of a parent block :3 so it actually shows parent function's arguments

  • @nosajghoul
    @nosajghoul Před 6 lety +4

    @7:00 thats pretty interesting, and depends on the direction of associativity.
    < and > (I hope those show up, less than and greater than) have left-to-right associativity.
    = (equals sign) has right-to-left associativity, which is why we can do a = b = 4
    developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence

    • @ankush3707
      @ankush3707 Před 3 lety

      its like difference between these two .. console.log('1'+1+1)..and console.log(1+1+'1');

  • @shyam5631
    @shyam5631 Před 3 lety

    Sir, upload more videos. These videos are extremely useful. You are explaining things that people couldn't find in other tutorials.

    • @Techsithtube
      @Techsithtube  Před 3 lety +1

      Syam, I am glad that you are finding the videos very helpful. Keep I have lots of tutorials on fundamentals of JavaScript , Node, CSS , React and interview questions.

  • @Vivekkanoje1989
    @Vivekkanoje1989 Před 5 lety

    as "+" behaves as concatenate operator in first console JavaScript automatically converts int 2 to string and concatenate to result into = 22. While in second console log "-" acts as subtraction operator and converts string to integer and results to = 0.

  • @tadeuskozlovski7286
    @tadeuskozlovski7286 Před 2 lety

    Good! Thanks!

  • @utsavkumar4381
    @utsavkumar4381 Před 5 lety +5

    Thanks Sir for the videos you make.
    About removing duplicates, if anyone does not want to use ES6, here is how it should be done in ES5.
    var a = [1,2,2,3,4];
    a.filter(function(value, index)
    {
    return (a.indexOf(value) == index)
    });

    • @Techsithtube
      @Techsithtube  Před 5 lety +1

      here i have a tutorial on how to remove duplicates multiple ways. czcams.com/video/dvPybpgk5Y4/video.html

    • @thillabanyai
      @thillabanyai Před 2 lety

      yes but he says you only have 1 line of code to solved it, and cannot use loops

    • @owaisali995
      @owaisali995 Před 2 lety +1

      and the problem with filters is it will take a lot of time to run, I mean running time is far more than SET that's why we should never use filter

    • @utsavkumar4381
      @utsavkumar4381 Před 2 lety

      @@owaisali995 i was not aware of this, can you explain a little more, or perhaps can share some material on this. Thanks in advance

  • @nadavsabah8409
    @nadavsabah8409 Před 4 lety

    thank you very much you upload a great video!

  • @ajinkya2323
    @ajinkya2323 Před 5 lety

    thanks for everything ..a small request they usually interviewer ask ..where you have implemented this in project ,for closure and other things

  • @Itamit420
    @Itamit420 Před 6 lety

    That was awesome... Can't leave without subscribing... :-)

  • @BenSmith-et9fv
    @BenSmith-et9fv Před 5 lety

    Thanks for sharing.

  • @RahulJain-bb1kl
    @RahulJain-bb1kl Před 4 lety

    wonderful that's what we need

  • @shailendrapathak5700
    @shailendrapathak5700 Před 5 lety

    Awesome dude..👏👏

  • @vikasshelake6321
    @vikasshelake6321 Před 4 lety +1

    excellent video

  • @suryarakeshyerramsetti2998

    Great videos, may i now what is online tool you use on videos for writing the code.

  • @BhaskarMalladi
    @BhaskarMalladi Před 4 lety

    Nice explanation.

  • @Archana1081990
    @Archana1081990 Před 5 lety +1

    You are great. Hats off.

    • @Techsithtube
      @Techsithtube  Před 5 lety

      Thanks for a nice comment archana keep on learning

  • @vipulzambare5329
    @vipulzambare5329 Před 5 lety

    You not only taught us interview questions but also how to learn language passionately..!!

    • @Techsithtube
      @Techsithtube  Před 5 lety

      To learn language passionately this video might help. czcams.com/video/X1omyGA67Vg/video.html

  • @omermindivanli2981
    @omermindivanli2981 Před 5 lety

    great video!

  • @sudhakarlahane7229
    @sudhakarlahane7229 Před 5 lety +4

    This is well explained excellent tutorial. In very short time you covered a lot.
    This is more useful beyond only pass the interviews.

    • @Techsithtube
      @Techsithtube  Před 5 lety

      Thanks for the nice comment :) and thanks for watching!

  • @rajbannasa7662
    @rajbannasa7662 Před 2 lety

    Thank you so much sir ❤️

  • @Anuj_Kumar_1
    @Anuj_Kumar_1 Před 4 lety

    6:32 let mean scope of the variable is in bracket or local in method..

  • @sundarrajendiran2722
    @sundarrajendiran2722 Před 6 lety

    Really awesome.

  • @purushothamdilli8398
    @purushothamdilli8398 Před 6 lety

    Awesome Sir..

  • @2002utube
    @2002utube Před 5 lety

    This video is very helpful

  • @Rockstervivek
    @Rockstervivek Před 5 lety +7

    Hello. Can i say something ?
    You are the best teacher of JS in the whole WEB :)

  • @gamberril
    @gamberril Před 5 lety +2

    A lot of good quality information, well explained in a short time. Thanks! I'll subscribe

  • @petardimitrov9232
    @petardimitrov9232 Před 3 lety

    Thanks a lot of man. Very interesting video.

  • @ZIONCSMX
    @ZIONCSMX Před 4 lety

    Nice video, just like the past one

  • @bhagwatsagute896
    @bhagwatsagute896 Před 6 lety

    nice sir ,
    can you please add the lecture series of interview question of javascript, HTML CSS, and PHP,
    and also add the lecture like top 50 or 100 php interview qauestion so that in single lecture we can get more information in details . really you are doing well. keep it up and thanks for your efforts.

  • @AmanGupta_Dev
    @AmanGupta_Dev Před 4 lety

    The first problem you mentioned. the actual term used is Type coercion.

  • @sibashishpadhy1569
    @sibashishpadhy1569 Před rokem

    I have no words to thank you sir.... it's really really very helpful and your explanation is great🙏🙏🙏

  • @somesbhowmick2082
    @somesbhowmick2082 Před 6 lety +1

    Great sir, Javascript is really tricky and criptic. learning new things

  • @aishwaryshah3823
    @aishwaryshah3823 Před 4 lety +1

    Sir, you are grand master in JS. Thank you just keep us updating in js. 😊

  • @webylancers5607
    @webylancers5607 Před 2 lety +1

    JazakAllah Aameen 🙏 🤲 😍

  • @daniels3960
    @daniels3960 Před rokem

    awesome video

  • @priyankaamahour
    @priyankaamahour Před 5 lety +1

    tysm sir , amazing video

  • @shripadjalamkar3296
    @shripadjalamkar3296 Před rokem

    great video

  • @armaanmhate2911
    @armaanmhate2911 Před 3 lety

    Thank You

  • @TheRaghavboyz
    @TheRaghavboyz Před 6 lety +237

    oh god, i wish i never sit in front of you in a js interview.

    • @PradeepKumar-ku5pe
      @PradeepKumar-ku5pe Před 5 lety

      @ThuatNham Hey can you please share secrets to crack interview

    • @Tryston
      @Tryston Před 5 lety +19

      They aren't very good secrets if its in a youtube video!

    • @sarthaknegi847
      @sarthaknegi847 Před 5 lety

      lol

    • @GhanshyamDobariya90
      @GhanshyamDobariya90 Před 4 lety +1

      You must wish, if you want to learn more 😁

    • @talkohavy
      @talkohavy Před 4 lety +15

      I feel sorry for companies who ask these silly questions.
      This is the worst test possible to know if someone is an amazing programmer, a good programmer, a so so programmer, and someone who's really bad at programming that has no self awareness to how bad they really are.
      seriously, if it were me going through the interview, I would withdraw my application form, greet the interviewee in front of me and say "Thanks, but no thanks".

  • @TheBadbucky
    @TheBadbucky Před 5 lety

    does anyone know the extension for showing broken code at 9:52 in VS Code

  • @rezaverse
    @rezaverse Před 4 lety

    well cone sir ... well done