Front End Mock Interview | Online Interview on JavaScript, CSS, and React , Questions and Answers

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys welcome to another episode of JavaScript mark interview this is an interview series where I interview one of you my audience and record the session and upload on youtube and today's interview is not only about jóska I also asked question on CSS HTML and react and today's interview is very smart and let's see how he performs and if you're not following the entire series I'll provide a link here so you can do so and welcome to tech see tutorials let's start so tell me like little bit about you in terms of your experience in JavaScript and what's your level like between one to ten okay I would say I started with basic jQuery Dom and blisters and stuff in the initial stages of my career I've been working since around three years and nine months before that I Lansford 1/2 years I worked on a lot of jQuery injury and then I was introduced to react like two years ago so I'm in the learning phase I would say decently good okay okay so I think you know all the core concepts okay great alright let's get started okay so here's a question all right so here's a question the write a program that basically prints number between one to hundred but it has to be multiple soft if it multiples of three so let's say if you see three then you print fred' face instead of number and if it's a multiple of five then you print bus but if it's both five and three like fifteen you would print fizzbuzz okay should I start you [Music] you [Music] [Music] I think we can run there's no no I need to call this first I can either do this or regular MEP not anything should this should work and I think we've done this yeah yes let's see don't say anything I don't see any fizzbuzz I only see a phase and buzz what is it one ping phase four buzz phase seven eight phase verse 11 so 15 supposed to be fizzbuzz right yeah 15 is supposed to the his boss 15 supposed to be yes no you stop at the start I think first condition should be the third elsif or er can be just I can just have a what is a local variable which I happened the text about a little thing which is initially empty or just the eye and I'll start with this condition no I I wouldn't need that collision at all in that case it will pass but then I think I can ex TR is equal to I naught I here actually I usually really empty string then if it's three then I'll address if it's five then I will add buzz okay let's have an is way in the end P over a hundred then we'll have I if there is any string then we have a string as well well you need to print the string itself at the end okay not inside LC area sorry so in the ends our videos mr. consul no I think they should work let's see yes three years for system yeah this is supposed to work I think it's working no do you find something wrong here but I see okay if you look at the question the question is if it's if you can divide by three then print fred' face if you divide by can divide by five then print buzz and if it's multiple of both 5 and 3 then print face buzz now I don't see any fizzbuzz here I only see phase and buzz separately that's because I don't need an else should we do it thank you yeah picture his face but okay 30 years okay well so is there any way to improve this algorithm yeah it should be what you think you know we don't have to do it I'm just gonna we can just talk about it so first of all introduce just doing 3 and 5 if you divide if you try to see if we can divide it by 15 then you can just print fizzbuzz all right let's move to the next one okay okay so draw two squares of width 50 pixel and they should be side by side in each square should have a circle in the middle in the center exactly with the radius of 10 pixels and the two squares should have should be separated by 10 pixels Debbie needs to kill um number of elements I can use I know just use whatever you can I would not say just don't don't use tables or anything except everything is felt it's fine yeah [Music] you yeah I think I just like that I used to disappear divisions there is no point in using sq1 and sq2 I can just I could have just done maybe first check yeah you no it's more it should be it's not I think it should be level Vic say it's mine pixel I need to do rock sizing if I need exact and yeah yeah I could I use this in case in case it's an icon or something then in that case I would have used maybe after a before instead of Hispanic let's change the requirement just a little bit instead of to have three squares yeah trees close it's good secondly I could have yeah I should I should have read model right and for all and last share a minute the shape yet this should do yeah unless see you have a second row we can do even in the second row we can do let's say margin bottom 10 but the second row we I mean after the LA after we can make that to 0 I'm Paige your number of a great okay this is good yeah so the next question is can you find the greatest common divisor of two numbers so for example let's say if you have a four and six you can divide both by two and if I have two and three then it's one because they're both prime numbers yeah first thing I'm gonna do is what are the largest numbers I'll have to first check if the smallest number is when four largest number I saw it was always the smallest one among the two if that is not the red case then the divisor will be less than half the biggest number okay if it's not for in the first in the first case four and six if it's not six is not in strict system or divided before it should be less than three I think I sort of remember this server where during the college so for example in case of 550 needed combi five or three so yeah in case of five and fifteen it would be five right yes you [Music] something called at the moment it's [Music] that [Music] [Music] [Music] [Music] they might check [Music] [Music] [Music] [Music] [Music] [Music] [Music] okay so lot I didn't get called transient asking you if I have traded we are am I going anywhere mom I'm going all the way I'm sure of that but I'm not really sure they're doing this yeah I can always return it or let's say I have to find all I mean I would hold up all the possible winning this particular place I can just return it correctly I hear if I don't return any basically like two times three suppose from a once yes you're from doing five and fifteen let me just guests yeah yeah I think this could go to battery okay so this is five okay let's change it to two and four so this should be to correct that's a twenty and thirty should be ten I'm just gonna throw some weird ones out okay all right yeah a simpler way to do it is using recursion let me ask you a question okay we have a about ten minutes L so let's say I have a component yeah okay now which is which keeps a score okay yeah or think of soft football game okay and football game you know the scores I usually liked one two you know it's not a huge number right so the players don't score every minute or every you know five minutes right it's this for quite less right so let's say if you build a UI where you have simple score that is updated whatever the the score is updated from the server right so you can do a couple of ways you can just keep polling every two seconds right to see if the score is updated and you get the new score and then you know you're only update if the yeah you only update the score if the if that if it's a different than what the previous court yes you can check third on the component of britain little faults if that is a simpler way or I can do yeah I can check I mean in the chute component of great method in the lifecycle method yeah there I would have accessibility to the previous state and the current I'm a previous props in the current props and the previous state and again state as well I think two of them then I can compare a check and compare if this score is not what it was then only I can return true otherwise I can just return false which by D by default should compared updated and true so by which makes a tree render so fair just written false won't render again that's one of the performance method right there you check the previous state and the current state and see if new state and if it changed then you do render otherwise you just return false right okay is there any different other yeah I can I think I can you whose a once I mean recently the will mount is deprecated I we have this get derive straight from the props there we can check the previous I mean the next state that's we're getting and we can keep the count in let's say props the previous props then I can cross-check that again same thing I don't need to update the state if I what you say if I don't have a different score I wouldn't even update the state the state a bit only would rear-ended the component so I can do that as well I think if I'm not wrong yes I think I can do that as well I think it's yet derived state from props if I'm passing the value through props if I use that right into I can update the state only in case also I have an update okay okay is there any other way I'm not very aware if there is if there is I'm pretty sure of these two I'm not very much very sure if there is another way if there is a way please yeah I haven't used the I am using shoot should compare but I haven't used the get us take it I'll try it out it's sort of equivalent to the Belmont yeah I can just one day I'm sorry top of your component would have the singular is you should fear take care of all that you know we wouldn't have to do that right era T we can use okay so there n kids sitting in a circle okay and then we have K amount of kit a toys so let's say there are three kids and we have five twice so each kit has a number like one two and three right so let's say if I start from number one kid then I would give it to number one two and three then I still have two toys right then I'll give it to number one again and number two so number two is my last kid that I give it to I do right so can you write an algorithm where I have these three numbers so I just told you right so if I have three kids five toys and number position is one where I start distributing the kids then the answer is basically to this the second kid gets the last toy so can you write an algorithm where I can give you an in combination you need to figure out who is the last kid to get the toy so is key always greater than n it could be less doesn't matter it would be even less yeah yeah so let's say if you have one kid then one K are three kids and one toy then the one the first kid would get the toy right in that case but it could be more so that you keep you how to keep distributing until you know so multiple kids would get kids who could get multiple twice oh yeah these right way to declare an array of so can you tell me approach what since we're running out of time yeah that's fine I was thinking I was thinking to come to end times each time I start with the positioner I each time I reach the maximum position n I will reset the i-20 and each time I cycle through I reduce the number of toys as soon as I reach but k equal to zero whatever I I have I think that the last position there is a much easier way if you just think about it so I give you the clue right it doesn't really matter if you do the one circle right because I can just reduce number of number of candies - number of kids into multiple it can be maybe I can do this on a flu shot if it's less than it he gasped en plus 1 you three seven one the one you example you give me three and five and one right yes yeah so the thing is you know you're thinking like an array right so it always starts from zero nobody here it starts from one okay all right so that's that's about it I think your JavaScript level is pretty good I would just suggest you know me when you get a question just look at the you know algorithm and just think before you start coding that's the only thing I would suggest otherwise you know you were a pretty good grasp on the JavaScript and I think your CSS level is pretty good as well Thanks all right thank you okay I hope you learned something from this video and if you did please like like comment and subscribe and you can help the channel via patreon I'll provide a link here and you can translate the video from me as well to your native language so your countrymen can also learn this it's very simple actually to translate I'll provide a link in the description and if you are looking for gift idea I have created a store for you as well you can check it out the link will be down down below thank
Info
Channel: techsith
Views: 100,967
Rating: 4.8645887 out of 5
Keywords: Front-end interview, interview questions and answers, mock interview, mock interview practice, online interview practice, mock job interview, interview preparation, questions for interviewer, javaScript, Skype interview, phone interview, 2018, 1019, practice interview, css interview, html interview, react interview
Id: qWg7SKHsl40
Channel Id: undefined
Length: 34min 22sec (2062 seconds)
Published: Mon Aug 20 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.