NodeJs Interview | NodeJs Interview Questions | NodeJs Questions

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome back to another exciting session i'm your host maish karya you're watching me on youtube now and today i'm having interview with one of the company i'm having a technical round in on 12 o'clock and i just think i thought that i have to share this video with you guys and it's been a while that i'm giving interview for different companies and now i found there are set of questions i am giving interview for node.js as a back-end developer where i am having experience there they are considering that i am having experience of four-year set list but there are common set of questions that that i have found that every company will ask you if you are giving interview for node.js so uh i hope guys you will like this video and please hit the uh subscribe button let's see how it goes and don't judge me guys it's might be it might be possible that there will be a few basic questions that i'm not able to answer it or something like that so we'll try our best we'll try it will be a screen sharing round where uh we'll be having a vs code open here and we'll uh write something here so let's see how it goes there and uh i'm not going to tell you the name of company and the the name of the person as well is going to take the interview because it's it's confidential of course and uh but the company is offering around 8 lpa to me and uh which is nice as as a developer i know there will be a might be packages of 25 like random and i don't know but i'm kind of uh i don't have that much of experience honestly i'm having experience of industrial experience i'm having only a couple of years not that much uh so let's see how it goes and uh i'm going to resume this video on 12 it's 11 44 september okay thank you bye okay i have joined this link and now okay i'm i'm i'm pretty nervous i'm not that sure but i have told you guys it's a package of eight lpa so it's in indian currency so don't get confused and the second point i'm not good in testing writing test cases and all i don't do these things that much so let's see and i'm waiting okay he joined let's see how it goes so your interview in node.js okay and the javascript related questions so uh let's start with your introduction a brief uh like your project so your responsibilities and all um before we start this one thing i have doubt about you uh you're resuming you have mentioned that uh you have done engineering uh from 15 to 20 right yep that's that's five years oh yeah yeah i took educational gaps as well uh i i was a freelancer at that time i used to get uh to work for clients and uh i have got the financial situation was not that good at that time so i decided to quit and somehow uh then i have i never get filled and never ever so i uh i got few dropouts as well so that's why it took me five years yeah okay and uh before joining the college you are a web developer uh yes in i have done polytechnic after 2012 and from that from 2012 i guess i started as making a small projects and somehow then i started as a freelancer and the most of the time i have spent as a freelancer only and past few couple of months from past few couple of months i've been working with uh okay got you uh so you have done this and after that your senior solution engineer uh at exhaust technology yes uh yeah that that's 2015 to 2016. so you are doing college and uh both right yes at the same time it was kind of small yes okay how much how much old are you i'm i'm 27 i guess 27 yeah again how much experience do you have in node.js uh in node.js we can consider three plus uh as three plus we can consider yes okay and you have idea about different technologies as well uh yes yes what are they um a php python fast api micro frameworks uh sql no sql databases both mysql and php have worked on these two technologies mostly uh then i switched to node.js from past few couple of years and yeah flutter i like to work on flutter and viewers if i get chance to work on it i'm not that good in react i i don't work on few things react redux and i'm weak in few points but yeah i like i'm i'm working as a back-end developer here and i have i'm managing few projects here got you so yeah now continue on your projects what you have done what is what your responsibilities were okay fine fine so uh see my very first project that i have got was english online dot io was a semi government site where i have uh created everything from scratch on which was a single-handed project and uh where where my role is to manage everything server side deployment load balancing and everything and i uh so that was my big project when i was a freelancer after that i got to uh one of uh there are few uh projects but currently i am having another project which is purple tutor dot io uh dot com i guess twitter.com yeah so uh where i'm at here i'm managing a complete back-end stuff writing queries uh everything that needs to be done uh getting even when i in that english online dot io i used to get the millions of views per day and i that time i understood how to manage the project for the multi-users and kind of things so everything that i have learned through my experience only uh during that period and now i am i'm actually uh having a pretty good uh command on node so the factory door project is also there and the the no i have done various small projects as well but i'm not counting uh that that's as a big project but yeah this is uh what i have done mostly i work on babel nowadays mostly the import kind of syntax and all and where i i like to write architecture whenever i get chance to work on any project i first i consider that if i get chance to write architecture of this project then i'll be more happier than anyone else because uh in this time span i have learned only one thing don't think that architecture makes sense everything is about architecture the clean architecture that i love the most yeah like that yeah you know what it is okay that's good so uh have you ever designed a database schema for a project yes yes i i i like to uh design schema uh because see when i was a freelancer there was no one else to tell me to how to normalize the data and all from that period of time as well to by making mistakes i have learned that the schema designing i properly manage the complete excel sheet for that proper coloring structure uh proper linking between the schemas and all that so i'm very good in not not very good i'm not sure but yes i like to honestly generally yeah you have experience with both sql and nosql uh yeah not that much means uh creating indexes and optimizing uh the queries that we if we see so i'm not that professional but yes i i can work on it yes do you know any query optimizing tool for no tools oh see mostly uh when when uh something goes wrong we use indexes writing indexes unique indexes that's the thing that i know mostly that we follow and the workbench is there the they show that that graph structure where something is going wrong so it will show you that in in the color red color orange color that it's it's this query is taking that much time so you need to optimize so on the basis of that uh flow that we can make logic of how we can optimize this thing so there are few things that i have realized like uh don't use select star use the select you have to define that names and this kind of basic things that i know to optimize the query yeah okay got you uh so yeah we can start with your first can question create a promises uh will produce true like response true uh when when it's resolved and false when it's rejected okay so okay let me try uh let's create call me function i will be having we are creating promise um okay if we say true then it means we have to resolve else we need to resolve we can say which is obviously going to be true always and reject will be false we can provide the condition as well something like that so nowadays i don't work on um promises that much uh hey use babel always to use i think of it and uh in catch will get error or kind of something like that i guess it's it's in it's always going to be true yeah hello okay you're on mute okay oh yeah sorry so can you run this code okay okay fine call me oh sorry now it's fine yeah it's not a function right it's variable now you have to achieve the same with the synchronous just okay yeah just just remove the promise keyword as well okay let's from this keyword as well okay fine let's create a function again will be normally sync so we can't use a weight directly here if we don't have the parent function sorry uh like this something like this of course we we need to use then here because it's not going to it's not possible to use away directly here so ah don't don't we do something for that uh like uh like this i guess anonymous kind of function where we can do something uh async i guess something like that [Music] like this you have to console something you can't console like that yes we can you first assign it to a variable then then consult that variable now see how it goes i have tried this as well at some point to wrap this and uh yeah like this okay we have done the additional dressing got it so now you're sure that how can we achieve something i think this thing i have done this before as well that the acing thing i missed here i have done this the main what what's the main concept of washing away uh to to wait for that callback and till then stop the execution for the other functions and once we get the result then we have to proceed and async is a keyword that let that function knows that it's going to be await at some point yeah like this the thing is you can't use a weight without testing inside a normal function right so i think that denotes that uh it's going to be a wait yeah at last you you have to use something right okay uh can you tell me the difference between the get and the force um kate uh like mostly we use uh gate for uh a the data that no we are not going to parse uh in the body at that time and we just need to fetch something out of the json or the response json uh or we need to query uh through the params and our query uh attribute at that time we used gate apart from that post is generally we need to uh pass the data with the kind of security purpose we if not possible to send the queries some times in the uh get method that so post is mostly based on the passing we passed to store the data to store the state we used to get post yeah so we can achieve the same functionality of supposed wire gate as well um no passing data in the body that's not possible but we can pass data uh what you have used for authentication purposes and node okay i mostly use jwt json web token i i like to oh yeah json web token mostly password can you explain the process of integrating cwt yes yes let me try you don't have to write the code okay okay uh input star as jwt let's say from jason vape token and after that we need to use gwd dot sign function where we'll be having kind of uh anything like name will be mahesh and we'll be process dot e and we are dot the secret or like this and uh jwt dot verify will latest uh the match that we just got the encrypted uh data we can say and we can pass that encrypted data with the key that we are going to have in process dot env dot cigarette like this and if we have decrypted data and then we'll unlock it out like this for sure got you can you uh create a post api yeah sure also for that we'll be having uh import x express from express cost app.gate we need to write post api right so we'll be having it will pass something over here like you can so lock it for now json request dot body body for that we need to use that uh have dot use as well to write uh the express dot json to pass data like body parser and have dot for url encoded as well do you know what middlewares are in yes middleware is anything that allows us to execute before executing this like let's say this post method i need to execute something here then i'll create my own middleware like my middleware and where i'll be using i'll i'll uh create a middleware here somewhere let's say my middleware will be having a request response and the next function and here we'll be having uh something let's say console.log that we are going to execute before executing this app.post so here we'll write i am middleware and here after that can you tell me the difference between all bind and apply okay okay yes oh yeah call is uh mostly we used to pass the values uh like if i'm having a function anything uh cost hello like this and if we are logging something here and we can use like this this dot name and here we can call that function with uh with this call thing and we can pass something here let's say mahesh and yeah one more thing this is it's not going to work if we use arrow function here we need to define function attribute function key and now we can use like this this dot and if we use bind then we can we can pass the data in array i guess or like like this so we can get arr here and we can use ar something so the only difference that i have found is here we can pass the uh the single uh we can say the value and here we can pass in array and in point i guess [Music] yes uh the bind is is used to return the function means it's going to return the another function that will be having it's been a long time i'm not working uh on this so let's say if i'm using this okay so it will provide another function then i'll i'll call this function like this find me so this is the difference in in apply okay okay i i need to read on this so it it returns the functions that i know that i know okay do you know about closures in javascript um yeah closures is uh something like this like like if i need to uh i'm passing few variables yeah yeah it's let's uh if we have a function mainly in callbacks when we use uh when we create a result and it's having access of its of the closest means parent uh functions as well the so we can pass the data through the parent function it will be accessible to the uh we can say all the um internal functions so like that yeah so we don't need to define variables spread operator when we when we have a number of variables like a and b we know and after that we don't know so at that time we use something like uh that okay and like that so spread operator this this rest one i guess so the mostly that i use is this one dot dot dot like this okay can you tell me the difference between the lag constant where yeah uh late late after year six we got late and constant before that we used to work on var which was a having access of that uh global scope and late and caused mostly having a block scope so there is the glo when we have to define the variable as a global so uh even we don't need to define var as well nowadays we can directly define like this so it will be available so that's the difference here i have a pasted your code in the chat can you can you tell me the response of that if having jobs true okay so where income is five ah then income became a fifty okay for this thing only ah then here uh we have defined uh like this so it needs i never executed like this uh it should be don't worry okay it's fine then so let's okay it's just for defining the block scope okay so then income become 500 and here income became of that thing okay so it's according to me i'm not that good okay so let it will be like five answer will be answer will be five according to me i guess answer will be five i guess you can run the code and test uh sorry i hope i five thousand okay it became a five thousand because okay i'm sorry i was wrong because it's having a global access it will be executed here okay got it [Applause] not that much but yes i i can write yeah i guess you have used to write test cases in a node not that much honestly uh just that we used that one of my colleague was facing few issues with chest so i have worked with him a couple of times so yeah like that but we have not done the test uh no not that much honestly because i don't want to be like that yeah okay what are arrow functions and how they are more good yeah one thing that i noticed that arrow functions if you write arrow functions and there will be a single line of code so we don't need to write of it we can simply write async that's the benefit of this we don't need to write curly braces sometimes in single line functions and like that okay don't you know about this scope of this uh scope of this where let const scope of this functions and normal function what is the difference between that uh normal functions we use the call thing to send the function the values and in this i guess i'm not sure in arrow function somehow i haven't used this uh yet in arrow functions i haven't got chance i guess yep okay so you don't know the scope of this but uh there's one last question start doing that okay okay fine ah shut the screen at the boat okay ah third third oh okay let me try uh let's create a kind of uh uh third main kind of function yeah okay okay okay if we are having a function which will pass the array let's say and we are having a max variable i guess which will be needed but uh we can use mean one in two and mean three kind of things will be having a area of let i'm just considering sort and reverse of let's say zero zero position plus one which will be max variable after that we'll be having a for loop normal for loop where we'll be having a let a now here is less than here our total length gth and we're having here our i plus plus a plus plus sorry and then we'll be having kind of if let's say of the mean the mean mean one is less than a order of something like uh d ah then we will use mean three to store the value of main two then we'll be having a main tool store the value of uh mean one and mean one will be i guess uh like uh a or a like when you had you sort in reverse no it's it's just for getting max variable i'm assuming the max variable will be something of let's say something like this the max variable i'm assuming so i have that was okay that's i thought will be pretty good i guess like that okay let's uh let's assume the next one will be if i use our main mean 2 i guess will be if this let's start an a and then we'll use mean three equal to mean to when mean two will equal to error of zero i guess it's been a long time i i'm not that sure and if i use mean three is less than error of a then will use 3 and if i pass third mean here and let's see some kind of array like this so it should return i guess so what i'm assuming is let this 1000 i got ah then i used light okay okay sorry sorry it's like this uh trying to change this uh variable values that's it it's somehow stick to zero and uh you have what we have here done e what what's the value of a okay the major thing the okay it's the starting point was missing there that's why it's it's not going to work like this okay the zero was missing the value should be the minus i missed the lowest one then it will work right so what about your debugging skills i'm pretty nervous i guess that's why yeah you can't debunk your code yeah yes i guess yeah okay got you yeah i'm done with your interview uh do you have any questions for me uh no thanks okay so you you don't have any anguish uh no i'm actually was not happy with the my performance only that's why uh that's the thing that i missed it's been a long time that i haven't tried this thing the two things mainly i missed here that's obvious that it's not good yeah so it's it's obvious that uh the results are obvious that the basic things that matters most i guess yeah [Music] but yes i i uh it's it's good to work uh to talk to you honestly uh hi guys i just had an interview with uh the first round of interview i have cleared and now i'm having interview at 4 00 pm uh for a second round i know i have made few mistakes basic mistakes even though i got selected i'm not that sure how it will go but they are expecting me to uh be more talk about uh lambda functions aws kind of stuff and let's see how it goes but uh i don't use lambda functions that much i am familiar with firebase functions so i'll tell them that i need to read on this honestly but as i told you guys sometimes we we one don't know the basic things that we miss and that is uh more important than any anything else so uh yes i was not expecting uh for the second round i thought i'll be rejected and somehow i got called they told me that uh the results are positive and uh let's see how it goes so uh it's 3 37 and uh in few minutes i'll be having another interview around second it will be with the the team lead i guess team leader i don't know the cto i guess oh they will more talk about what i know is kind of a team management stuff kind of confidence level this kind of things might they will ask that i'm considering and uh based on that we'll see so if you like this video don't forget to subscribe and uh thank you i'll get back to you at 4pm bye
Info
Channel: Mahesh Kariya
Views: 72,435
Rating: undefined out of 5
Keywords: nodejs interview, nodejs interview questions, nodejs
Id: Z1fYAMXoX9E
Channel Id: undefined
Length: 40min 33sec (2433 seconds)
Published: Sun Sep 12 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.