React JS Live Coding Interview 2023 - Cracking the Interview (Mock practice)

Ғылым және технология

We interviewed a college student for React JS live coding mock interview round. There were react js-based component development questions which checked for some HTML and React knowledge
#reactjs #javascript #coding #interview #interviewquestions #mockinterview
🤯 Crash Courses (Single Video)
Git/Github Crash Course : bit.ly/3JSA5VT
TypeScript Crash Course : bit.ly/372dZSh
Angular Crash Course : bit.ly/3DoGJR1
Vue JS Crash Course : bit.ly/3uDujRl
Python Crash Course : bit.ly/3Dod7U2
React Router Crash Course : bit.ly/36YfO2i
🧑‍🏫 Full Course Playlists
HTML : bit.ly/36IMq0h
CSS : bit.ly/3LpRQw6
JavaScript : bit.ly/3u049tf
BootStrap : bit.ly/3NA9nDJ
ES 6 : bit.ly/3DvYCh6
DOM Playlist : bit.ly/35nMKB7
ReactJS (Redux & Hooks) : bit.ly/3iMethN
React with TypeScript : bit.ly/3fQjXtF
React Hooks: bit.ly/3Vmh7wV
Redux: bit.ly/3yAIIkl
NodeJS/ExpressJS : bit.ly/35nN6Yt
MongoDB / Mongoose : bit.ly/3qPj0EO
💻 Projects Playlists
MERN Stack Complete Ecommerce : bit.ly/3ymSs0E
Web Design HTML+CSS - Home Page : bit.ly/35nZiIB
Web Design BootStrap - E-Commerce Site : bit.ly/3iPhaz7
React/Redux/Firebase - Todo-App : bit.ly/3DnekL8
🕹 Mini Projects (Single Video)
React - Tic Tac Toe (Redux / Hooks) : bit.ly/3uzLEuy
React - Game of Flag Quiz (Hooks) : bit.ly/3LpTC0e
React - Google Translate Clone (Hooks) : bit.ly/3Lo9xvZ
React - Chat App using Firebase (Hooks) : bit.ly/3wLgymj
Visit our site: coderdost.com
🔴 Full Courses List : coderdost.com/courses
🔴 Full Projects List : coderdost.com/projects
💾 Source Codes at : github.com/coderdost

Пікірлер: 227

  • @coderdost
    @coderdost Жыл бұрын

    Code : codesandbox.io/s/delicate-river-8zur7n

  • @kanjarlanarasimha2605

    @kanjarlanarasimha2605

    11 ай бұрын

    Sir in your code why we need countries [country] && in second select drop-down tag please clarify my doubt sir

  • @arpityadav7290

    @arpityadav7290

    10 ай бұрын

    For short-circuit Means jab tak country select ni hogi tab tak country state blank rhegi toh error through karegi isliye && means aagar country state me value hai toh he vo aage move karegi

  • @ravivishnoliya7316

    @ravivishnoliya7316

    4 ай бұрын

    no use of useeffect here

  • @WaqarAhmad-qz8mv
    @WaqarAhmad-qz8mv Жыл бұрын

    Good that you are suggesting, not like other interviewer who just stay silent and think that you know nothing

  • @pervert_kun

    @pervert_kun

    Жыл бұрын

    This wasn't good either lol

  • @anshupatel8087

    @anshupatel8087

    9 ай бұрын

    😂😂

  • @shubhamgoyal1547
    @shubhamgoyal15478 ай бұрын

    A good strategy is to talk though your thought process. That way its easier for the interviewer to help and understand.

  • @SunilparajuliKenshin
    @SunilparajuliKenshin7 ай бұрын

    while i might not know the syntax at the but as soon as i saw the questions what he can do it is: first map to generate options selection for country, based on country code i.e. "in" , upon selection of first item, he could filter the map to get selected country & selected cities in 2nd dropdown.

  • @k303k
    @k303k Жыл бұрын

    Hi sir! This is very helpful.Pls create more react interview codings in the future.

  • @sreeharinallapaneni1726
    @sreeharinallapaneni172610 ай бұрын

    That's a good approach, For second dropdown, you can try filter the countries with the selected country and extract the cities property and chain that output to map function... like below {country && countries .filter((c) => c.name === country)[0] .cities.map((city, i) => { return ( {city} ); })}

  • @coderdost

    @coderdost

    9 ай бұрын

    👍

  • @hariacharya2534

    @hariacharya2534

    8 ай бұрын

    More comprehensive would be to store the cities of selected country in the state.

  • @liamwelsh5565

    @liamwelsh5565

    8 ай бұрын

    Using the index is more efficient. Your approach is O(c * n) where c is country and n is the number of cities in c. Using the index results in O(n) where n is the number of cities.

  • @nikeshgupta1241

    @nikeshgupta1241

    7 ай бұрын

    @@hariacharya2534In that case you have to handle a case can read property of undefined

  • @hariacharya2534

    @hariacharya2534

    7 ай бұрын

    @@nikeshgupta1241 how undefined? Set initial value in state to first item of array initially. Add on change event to update it. It's straight forward.

  • @quickgyan5152
    @quickgyan51528 ай бұрын

    That are valuable interview questions that's help to grap the opportunity for job

  • @subhasisdas9916
    @subhasisdas99164 ай бұрын

    I'm very impressed with that interview er. He's very helpful❤

  • @SivaAbhilash
    @SivaAbhilash Жыл бұрын

    People are who are looking jobs are busy how to crack interviews and people who are working as freelancers busy in developing applications using gpt-4 only difference both of them is person came for interview will work like a machine and freelancer will make machines work.interview is just a process of filtering competition not knowledge .alteast this youtuber is supporting sharing this video to lower the pressure of candidates going for interview 🎉

  • @coderdost

    @coderdost

    Жыл бұрын

    Great line .. interviews is just process of filtering… makes no sense for knowledge

  • @PaulGreen-lk1ym
    @PaulGreen-lk1ym10 ай бұрын

    A very informative video on how 2 guys are looking for a typo in the code for about of 15 minutes. Ty😁

  • @coderdost

    @coderdost

    9 ай бұрын

    Happens all the time in coding

  • @How2-port8080
    @How2-port808011 ай бұрын

    Great for helping students..🙏

  • @bardenishi4312
    @bardenishi4312 Жыл бұрын

    Outstanding !

  • @bishwajeetpandey1570
    @bishwajeetpandey1570 Жыл бұрын

    Wow so much helpful, i need more questions like this to practice

  • @coderdost

    @coderdost

    Жыл бұрын

    Sure. We will try more videos with more questions

  • @asifali_official3137
    @asifali_official3137 Жыл бұрын

    great work sir ❤

  • @arpityadav7290
    @arpityadav729010 ай бұрын

    Helps me a lot i am copying the question code by watching video and then a get this code sandbox link .

  • @iamkamal5960
    @iamkamal5960 Жыл бұрын

    Great work Sir!! Video would be way better if you could explain the code at the end, will really help beginners.

  • @hadeedtmgggg5837

    @hadeedtmgggg5837

    Жыл бұрын

    Bro he is mapping in the array and on the left hand he is displaying cities and in select on onchange the index of the country is set into set country and down below he is displaying cities when the index of the country change down below the country index change and the city element is changed like if country is India when it will change the index changed from 0 to 1 and it set in to country after that the other element access the 1 index object and display it's cities list❣️

  • @Portal-Solve

    @Portal-Solve

    Жыл бұрын

    Can I explain it in easy language

  • @csraju6623

    @csraju6623

    Жыл бұрын

    @@Portal-Solve yes go for it

  • @siddharthjoshi3328

    @siddharthjoshi3328

    11 ай бұрын

    ​@@Portal-Solve Abhi tak explain nahi kiya

  • @Portal-Solve

    @Portal-Solve

    11 ай бұрын

    @@siddharthjoshi3328 dil nhi kia wasy hi logo na itna code likhy ha.Tu ma na dekh kr behtar nhi samja

  • @clashingtv2527
    @clashingtv2527Ай бұрын

    For me 1st set the the country in state and its index! And default is blank or null! For second! I checked that if state empty then disabled! Bot are done by onChange! 2nd After setting the country and index enable the drop-down! And map the city 😁

  • @rsdeathgaming5027
    @rsdeathgaming5027 Жыл бұрын

    The question was very helpful for those who prepare for Interview I'm also preparing and I followed your whole playlist.. Thanks for the sharing valuable information sir 🙏

  • @coderdost

    @coderdost

    Жыл бұрын

    Great 👍🏻

  • @vinothkumarv9722
    @vinothkumarv9722 Жыл бұрын

    Its Awesome :) thanks sir

  • @pankajsuryavanshi8332
    @pankajsuryavanshi8332 Жыл бұрын

    Waiting for next episode. Saved this playlist

  • @AhmadAli-wt8zy
    @AhmadAli-wt8zy8 ай бұрын

    We can also use useEffect hook and add country as a dependency. So when ever country changes it will run and change the city dropdown. Am I correct?

  • @geetasarayaarts867

    @geetasarayaarts867

    5 ай бұрын

    Yes of course.but no need of adding useEffect hook here

  • @musicinc7851
    @musicinc78518 ай бұрын

    He could have used a state variable for cities and then simply update the state.

  • @CodingInterviewTV
    @CodingInterviewTV4 ай бұрын

    I've been asked about tools to use during the coding interview to get answers without the interviewer noticing, came across Coding Interview Champ not sure how good they are but looks interesting

  • @MuhammadBilal-hq3xn
    @MuhammadBilal-hq3xn Жыл бұрын

    Great I love this.

  • @aparnas1613
    @aparnas1613 Жыл бұрын

    const [country, setCountry] = useState(0) Loads cities in India on initial render :)

  • @coderdost

    @coderdost

    Жыл бұрын

    Great

  • @harshagarwal7832
    @harshagarwal78324 ай бұрын

    This same question was ask in my interview and I live coded this in a great was the interviewer was impressed and I got a offer from the company thanku sir for this types of video☺️

  • @pbarmyff

    @pbarmyff

    4 ай бұрын

    Whats your package

  • @harshagarwal7832

    @harshagarwal7832

    Ай бұрын

    @@pbarmyff That was only internship giving 15k per month for 6th months

  • @kiranmuttanwar8275
    @kiranmuttanwar82752 ай бұрын

    @coderdost what was the exp if that person? I mean at what level tvis kind of question are asked for freshee 1to 2year or more than that if you could tell

  • @adeelkhizar5793
    @adeelkhizar5793 Жыл бұрын

    Good job🎉

  • @code_kraft7
    @code_kraft78 ай бұрын

    why he used value={country} in line 22 of solution please reply

  • @pankajkthakur8042
    @pankajkthakur8042 Жыл бұрын

    Onchange filter out the selected country object and amp other dropdown with filtered cities. Its an easy problem … i am giving interview they ask to call api and show some hierarchy level drop-down or create multiple components set data in context apis

  • @coderdost

    @coderdost

    Жыл бұрын

    In live interview over screen-shared or timed-assignments ?

  • @hashirmughal5625
    @hashirmughal5625 Жыл бұрын

    wow love from Pakistan sir you are great😍😍😍😍😍😍

  • @Anushree__12021
    @Anushree__12021Ай бұрын

    I am a fresher.. during interview, interviewer asked to bring the file of other folder the to project directory using react code. I got reject in interview. Can anyone say what is the solution? Can we use import for this?

  • @imnawasthi
    @imnawasthi Жыл бұрын

    I have a slight confusion in this video, maybe i am wrong, but he created a state that accepts an object, then assigns a index(option's value) to it. Is it possible or i misunderstood something?

  • @coderdost

    @coderdost

    Жыл бұрын

    I think he changed it in between but due to scrolling of code editor, it was not visible. your confusion is correct and candidate changed approach in between,

  • @VishalSharma-rn7mt
    @VishalSharma-rn7mt5 ай бұрын

    Awesome example

  • @ForLearning-jf1li
    @ForLearning-jf1li3 ай бұрын

    please make some more videos like this

  • @mark-cr4by
    @mark-cr4by11 ай бұрын

    Nice thats a lot of pressure

  • @vikasbhatiwal4878
    @vikasbhatiwal4878 Жыл бұрын

    in your codesandbox . you checked for countries[country]&&, but the candidate didn't..... though his cide is working but when i dont'check countries[country]&& my console shows can't read property of undefined (reading cities. ) Please explanin the reason

  • @coderdost

    @coderdost

    Жыл бұрын

    I think candidate has changed the code later on . So may be some initial value of countries was there at top not visible may be in video..

  • @careerskills6973
    @careerskills69737 ай бұрын

    This type of questions are for freshers/experience ?

  • @iftekhar_ansari
    @iftekhar_ansari Жыл бұрын

    Take index instead of taking value

  • @karanbhoite9552
    @karanbhoite9552 Жыл бұрын

    There is one bug , while sending values to backend country's value would be 0 coz setting index to value of country while doing onchange, This one is not proper solution i guess below answer would help you all While doing onchange on country select {item.name} While rendering cities countries.find((item)=>country===item.name)?. cities?.map()

  • @coderdost

    @coderdost

    Жыл бұрын

    yes the candidate just finished it, all edge cases not discussed.

  • @karanbhoite9552

    @karanbhoite9552

    Жыл бұрын

    @@coderdost keep uploading this kind of videos, I am also preparing for the interview its really helpful

  • @igu642
    @igu6428 ай бұрын

    ❤❤❤❤

  • @bloggerayush8550
    @bloggerayush85504 ай бұрын

    for what LPA, we can expect this question??

  • @thanniruanilkumar8232
    @thanniruanilkumar82327 ай бұрын

    This interview fresher level or Experience level

  • @PunkSage
    @PunkSage3 ай бұрын

    The main issue is that the interviewee started by immediately writing the final code. It's usually better to start with a mock-up of the data and then add dynamic values with React. This way, we wouldn't waste so much time fixing small errors like closing brackets. I would give this person a 7/10 for their technique. Although they got the expected result, the way they did it wasn't very impressive.

  • @ahndeux
    @ahndeux11 ай бұрын

    No stress.. No stress... YOU'RE DOING IT WRONG!! No stress.. No stress... YOUR SELECT STATEMENT IS BAD! No stress... No stress...

  • @DESTRUCTION1347
    @DESTRUCTION1347Ай бұрын

    Sidha filter lagate aap second map ka new array aata uspe

  • @akshayshrivastava6057
    @akshayshrivastava6057 Жыл бұрын

    i am also a fresher(completed btech in last july) should i can also be a part of your coding interview for react or angular? please let me know

  • @coderdost

    @coderdost

    Жыл бұрын

    Yes as soon as we will start it again. right now no plans for it in coming week. But hopefully we will try soon

  • @rajubojja2446
    @rajubojja244611 ай бұрын

    import "./styles.css"; import {useState} from 'react'; const countryArrays = [ { country:"India", value:"In", cities:["Telangana","AndhraPradesh","Rajasthan","Maharashtra"] }, { country:"Pakistan", value:"Pak", cities:["Pak-One","Pak-Two","Pak-Three"] } ] export default function App() { const [array,setArray] = useState(countryArrays); const [state,setState] = useState([]) const changeStates=(e)=>{ const filtered = array.filter((item)=>item.value == e) setState(filtered[0].cities) console.log(state) } return ( changeStates(e.target.value)}> { array.map((item,index)=>( {item.country} )) } { state.map((item)=>( {item} )) } ); } I tried

  • @abhayraut5659

    @abhayraut5659

    10 ай бұрын

    const changeStates=(e)=>{ const filtered = array.find((item)=>item.value.toString() === e.toString()) setState(filtered.cities) } console.log(state)

  • @Factvideo014
    @Factvideo014 Жыл бұрын

    New challenge for me🤔

  • @tathagat9586
    @tathagat9586 Жыл бұрын

    ❤❤

  • @rohitghadage3220
    @rohitghadage3220 Жыл бұрын

    Sir one question I use ContextAPI is it necessary to learn redux?

  • @coderdost

    @coderdost

    Жыл бұрын

    redux's main cocept is about reducer/action/dispatch... you can learn these by using useReducer hook. Redux is not needed. but many companies using it..

  • @hitsgamingparadise5243

    @hitsgamingparadise5243

    Жыл бұрын

    Yes it's necessary to learn Redux ... You can learn Context API too ... Because most of the company use redux. You can see that in their job requirements list. Even the company that I am working in uses Redux in 3 applications and context api and redux in both in one.

  • @dilshadzm313
    @dilshadzm313 Жыл бұрын

    How much will the payroll for this type of interview ? I'm doing way more complex problems than this and I'm getting 15k per month it's a startup company and they didn't even conduct a coding interview they just asked a few questions and recruited me

  • @coderdost

    @coderdost

    Жыл бұрын

    this was a live interview, where you have to code in front on someone in given time, so question was easy, but people are more nervous. Also they have to code on an online editor not their VScode. Payroll is very much dependent on your experience + city. for a fresher companies can pay very low. But after 1-2 year of experience the real worth of your work will be valued.

  • @AhmadRaza-uo8ze
    @AhmadRaza-uo8ze5 ай бұрын

    Now I feel good that I am not a noob

  • @anuragtiwari6910
    @anuragtiwari6910 Жыл бұрын

    sir if possible please pin the codesandbox link for these interviews.... it helps us to try /edit these challenges practically

  • @coderdost

    @coderdost

    Жыл бұрын

    but problem is everyone edits it... codesandbox.io/s/delicate-river-8zur7n

  • @anuragtiwari6910

    @anuragtiwari6910

    Жыл бұрын

    @@coderdost i think there is a option to lock the sandbox...so that the other person can only fork it for self editing ...and not change the orignal sandbox..like in many udemy courses

  • @coderdost

    @coderdost

    Жыл бұрын

    @@anuragtiwari6910 Thanks. will check this next time while sharing code.

  • @user-uu1cs8jl8b
    @user-uu1cs8jl8b Жыл бұрын

    i thought you were asking for nested type dropdown

  • @coderdost

    @coderdost

    Жыл бұрын

    No simple one only. Generally interviewer increases complexity on completion of each step

  • @sohebshaikh3344
    @sohebshaikh334410 ай бұрын

    Mazaa Ayaa

  • @harrapanman621
    @harrapanman62110 ай бұрын

    How to practice for these kind of machine coding rounds

  • @coderdost

    @coderdost

    9 ай бұрын

    Its best to make small projects, only making features for practice will not be a good idea - projects cover multiple such things in 1 project.

  • @osama-ki_masi-ki_pota7677
    @osama-ki_masi-ki_pota76778 ай бұрын

    He is from iter

  • @anuragsonkar3227
    @anuragsonkar3227Ай бұрын

    35 mins 😅 : export default function App() { const [country, setCountry] = useState(""); const [cities, setCities] = useState([]); function handleChange(e) { const selectedCountry = e.target.value; setCountry(selectedCountry); const filterCities = countries.find((ele) => ele.value === selectedCountry); setCities(filterCities ? filterCities.cities : []); } return ( { handleChange(e); }} > Select country {countries.map((ele) => ( {ele.name} ))} {/** set cities */} {cities.map((ele) => ( {ele} ))} ); }

  • @PIYUSH-lz1zq
    @PIYUSH-lz1zq Жыл бұрын

    in codesandbox can we save the code there itself ??

  • @coderdost

    @coderdost

    Жыл бұрын

    Yes.

  • @satyaranjanbehera
    @satyaranjanbehera Жыл бұрын

    i am trying this code but it is showing cities not defined

  • @coderdost

    @coderdost

    Жыл бұрын

    check the variable before the .cities must be having some issue

  • @prasadjoshi4009
    @prasadjoshi4009 Жыл бұрын

    How to use base64? Can you ad in form?

  • @coderdost

    @coderdost

    Жыл бұрын

    Base64 can be directly used in image SRC.. but if you want to cretae base64 fr some file use FileReader APi and use readAsDataUrl method

  • @coderdost

    @coderdost

    Жыл бұрын

    There will be examples of this on MDN etc sites

  • @sumitpatil7473
    @sumitpatil7473 Жыл бұрын

    Please method se hota hai but forloop se batao pleas 🙏sir Reverse number put in same index number [12,23,45]=>[21,32,54]

  • @coderdost

    @coderdost

    Жыл бұрын

    without using Split() method ??

  • @sumitpatil7473

    @sumitpatil7473

    Жыл бұрын

    @@coderdost yes sir,without any predefined method.

  • @sumitpatil7473

    @sumitpatil7473

    Жыл бұрын

    @@coderdost cl(array.join(" ").split("").reverse().join("").split(" ").reverse())

  • @coderdost

    @coderdost

    Жыл бұрын

    I think you can just reverse the number by changing 10th places - and use a For loop on this : let remainder, reverse=0; let n = 321; while (n != 0) { remainder = n % 10; reverse = reverse * 10 + remainder; n = (n-remainder)/10; console.log({n, reverse, remainder}) } console.log(reverse)

  • @littleshorts6969
    @littleshorts6969 Жыл бұрын

    *15 mins and a government website*

  • @_ShaikhMohammedFazleHaqueAmin
    @_ShaikhMohammedFazleHaqueAmin Жыл бұрын

    I also want to participate in mock test how can I do that?

  • @coderdost

    @coderdost

    Жыл бұрын

    By applying on forms. Form is released many times. All updates are on our community page on KZread

  • @premprem4095
    @premprem40956 ай бұрын

    😢😢I experienced that the same question my interviewer asked. I am failed.

  • @expectedreaction409
    @expectedreaction409 Жыл бұрын

    countries[country]..... i did not get it... help

  • @coderdost

    @coderdost

    Жыл бұрын

    Here they took country - as index of countries array. So this means selecting just one of array items

  • @littleshorts6969
    @littleshorts6969 Жыл бұрын

    How to Share File Larger than 3 GB using webrtc

  • @coderdost

    @coderdost

    Жыл бұрын

    Never worked on this big file. There will be issues regarding reliability. How to deal with paused downloads and also how to deal with network failures.

  • @rohantyagi8145
    @rohantyagi8145 Жыл бұрын

    Can anyone explain counteries[country].cities

  • @coderdost

    @coderdost

    11 ай бұрын

    i think coder has changed "country" as index values. so countries[0] is the object and in that object cities property is an array. which is being used

  • @DevDivine
    @DevDivine Жыл бұрын

    I am also looking for a ReactJS job if you have any suggestions then please let me know.

  • @coderdost

    @coderdost

    Жыл бұрын

    If you dont have job experience go for anything.. even an internship. And don’t wait for bigger jobs.. right now there is slowdown in IT but next year or after that it will be again boom. You have to get as much as experience by that time

  • @ShoaibKhan-hy7zt

    @ShoaibKhan-hy7zt

    Жыл бұрын

    ​@@coderdost I am having experience of 7 months in react js and searching new job how would I get it 😢?

  • @himanshusahu8220

    @himanshusahu8220

    Жыл бұрын

    ​@@ShoaibKhan-hy7zt Same 8 months of experience I have

  • @ShoaibKhan-hy7zt

    @ShoaibKhan-hy7zt

    Жыл бұрын

    @@himanshusahu8220 from where are you?

  • @himanshusahu8220

    @himanshusahu8220

    Жыл бұрын

    @@ShoaibKhan-hy7zt Gwalior

  • @zakishaikh3201
    @zakishaikh32018 ай бұрын

    This is for freshers I thing

  • @user-zt3jk5gb9h
    @user-zt3jk5gb9h Жыл бұрын

    how to do this in angular, any angular dev in the house?

  • @coderdost

    @coderdost

    Жыл бұрын

    stackblitz.com/edit/angular-wfmpqq

  • @rohitjadhav7844
    @rohitjadhav7844 Жыл бұрын

    sir plz give me codesandbox link

  • @coderdost

    @coderdost

    Жыл бұрын

    codesandbox.io/s/delicate-river-8zur7n

  • @rohitjadhav7844

    @rohitjadhav7844

    Жыл бұрын

    Thank you so much sir

  • @sankalpkala9219
    @sankalpkala921910 ай бұрын

    Is this expected from a fresher for on campus placement?

  • @coderdost

    @coderdost

    9 ай бұрын

    campus placement are based on Percentage, grades, and some coding skills. but live coding is not expected mostly. coding test also will be generic programming and DSA type - not React etc.

  • @arsh10x
    @arsh10x Жыл бұрын

    Can I expect this type of questions for freshers?

  • @coderdost

    @coderdost

    Жыл бұрын

    Depends on company. But coding rounds can have such questions. In startups definitely they will ask practical problems

  • @pervert_kun
    @pervert_kun Жыл бұрын

    Ok for a fresher

  • @turantech
    @turantech8 ай бұрын

    Typing and not talking is huge red flag. You should explain what are you doing! At least in US we do it

  • @taandavyt8826
    @taandavyt8826 Жыл бұрын

    Real mei to bhut tense situation hoga imagine krke hi fat rhi h sachme interview dunga to kya hoga

  • @coderdost

    @coderdost

    Жыл бұрын

    Unless you are going for a good startup job or senior level job - people will not take live code interview. They will give task to be done in some time limit. So it will be less tense. But it will be tense, so better to practice more.

  • @m.sansari9934
    @m.sansari99348 ай бұрын

    There are 3 ways to solve this

  • @pranav5532
    @pranav5532 Жыл бұрын

    Is this Question for Freshers or Experienced?

  • @coderdost

    @coderdost

    Жыл бұрын

    freshers

  • @crabop1127
    @crabop1127 Жыл бұрын

    Any Body tell me most commonly used platform for interview like sandbox

  • @coderdost

    @coderdost

    Жыл бұрын

    syncfiddle.net/ for javascript and simple web apps. It is live sharing without any account.

  • @abhayverma7080
    @abhayverma70808 ай бұрын

    const countries = [ {name:'India', value:'IN', cities:['delhi','mumbai']}, {name:'Pakistan', value:'PK', cities:['Lahore','Karachi']}, {name:'BanglaDesh', value:'BG', cities:['DHAKA','CHi']} ]

  • @lingarajhiroli965
    @lingarajhiroli965 Жыл бұрын

    how can i get the code of this video

  • @coderdost

    @coderdost

    Жыл бұрын

    codesandbox.io/s/delicate-river-8zur7n

  • @lingarajhiroli965

    @lingarajhiroli965

    Жыл бұрын

    @@coderdost thank you bro

  • @blackpurple9163
    @blackpurple9163 Жыл бұрын

    I was stressed to watch him try and fix his mistakes, it's even know difficult when someone is watching

  • @coderdost

    @coderdost

    Жыл бұрын

    yes real life stress handling is biggest part of interviews.

  • @Dopamine432
    @Dopamine4327 ай бұрын

    speak bro

  • @devlopersessential4349
    @devlopersessential4349 Жыл бұрын

    This was a fresher interview or an experienced ??

  • @coderdost

    @coderdost

    Жыл бұрын

    Fresher .college student

  • @Pankajdutt14
    @Pankajdutt142 ай бұрын

    Is this guy fresher ? 😂. Itna easy question react ka maine 3 sal me kisi ne nh poocha 😂

  • @healingmusic..2683
    @healingmusic..26839 ай бұрын

    Sir please tell it's for freshers or for experienced ...🙏

  • @coderdost

    @coderdost

    9 ай бұрын

    freshers mostly.

  • @dibakardey6038
    @dibakardey6038 Жыл бұрын

    is thisa correct answer

  • @coderdost

    @coderdost

    Жыл бұрын

    There can be several type of approaches, even better than this. But as in interview, candidate was able to do this under 30 mins , and it was correct.

  • @tushantkumar2707
    @tushantkumar2707 Жыл бұрын

    y work nhi kar rha hai mera m cities undefined bta rha hai

  • @kulyog6626

    @kulyog6626

    Жыл бұрын

    Share the code

  • @tushantkumar2707

    @tushantkumar2707

    Жыл бұрын

    @@kulyog6626 import React, { useState } from 'react' const countries=[ { name:"India" ,value:"IN", cities:[ "Delhi", "Mumbai" ]}, { name:"Pak" ,value:"PK", cities:[ "Lahore", "Karachi" ]}, { name:"Bangladesh" ,value:"BG", cities:[ "Dhaka", "Chittagong" ] } ] function DropDown() { const[country,setCountry]=useState( {name :"",value:"",cities:[]} ) // let selectectCty = (country.name !="")?country.cities:''; // console.log('===',country) // let finalCityList = countries.filter(ob=>ob.name ==selectectCty); // finalCityList = (finalCityList.length) ? finalCityList[0].cities:[]; // console.log(countries) // console.log('finalCityList==',finalCityList) return ( { console.log(e.target.value); setCountry(e.target.value); }}> { countries.map((item,index)=>{ return {item.name} }) } {/* 2nd dropDown */} { countries[country].cities.map((item,index)=>{ return {item} }) } ) } export default DropDown

  • @coderdost

    @coderdost

    Жыл бұрын

    2 changes 1. const[country,setCountry]=useState(false) // state initial vale make it false 2 . country && countries[country].cities.map((item,index)=>{ // add "country &&" to check for empty country return {item} })

  • @tushantkumar2707

    @tushantkumar2707

    Жыл бұрын

    @@coderdost thank you sir its working and sir mujha frontend m 2 saal experience hai or m ab mern stack m jana chta hu or kya recssion m job mile jyagi kya please guide m how to prepare in mern stack 🙏🙏🙏🙏

  • @coderdost

    @coderdost

    Жыл бұрын

    @@tushantkumar2707 More jobs are in frotnend then full stack. So jobwise I don't think fullStack roles will be there. But learning Node is always a plus point. Jobs may be less now but try to work in smaller startups or lesser pay.. as next 1-2 year can be slow.. but there will be eventually be a boom.. and all work experience will matter.

  • @shoiabalam2170
    @shoiabalam2170Ай бұрын

    i think we are indian we should use hindi instead of english.

  • @wizardtechnical
    @wizardtechnical Жыл бұрын

    Is it the right answer?

  • @coderdost

    @coderdost

    Жыл бұрын

    its almost right. there may be some initiiazation issue. also this is not the only approach to solve this problem.

  • @ManojKumar-us5fz
    @ManojKumar-us5fz3 ай бұрын

    Stop calling Sir/Madam its interview

  • @ankit21309
    @ankit2130911 ай бұрын

    Are these real coding interviews

  • @coderdost

    @coderdost

    10 ай бұрын

    Mock Practise, but the setting is real..candidates are actually preparing for react interviews and they don't know the interviewer before.

  • @jahiruljitu3255
    @jahiruljitu325510 ай бұрын

    Poor process of interviewing, feature is something everyone can create reather ask him core javascript and react concept. This seems like school or College exam,such a poor interview process.

  • @coderdost

    @coderdost

    9 ай бұрын

    most people mug up concepts(react and js) and can't write a line of code. Believe me, interviewing since 2014, most freeze to make a simple dropdown in real interview when someone is looking live.

  • @deepanshuheer01
    @deepanshuheer01 Жыл бұрын

    Easy problem

  • @samarscript5824
    @samarscript582411 ай бұрын

    I think question was expected such kind of answer ! export const AutoDisplayCity = (props) => { const [countryValue, setCountryValue] = useState(); const Countries = props.CountriesArray; const countryHandler = (e) => { setCountryValue(() => { return Countries.filter((cntry) => cntry.value === e.target.value); }); }; return ( --Select Country-- {Countries.map((country) => { return ( {country.name} ); })} {countryValue && ( {countryValue[0].cities.map((city) => { return {city}; })} )} ); };

  • @coderdost

    @coderdost

    11 ай бұрын

    Nice code snippet

  • @samarscript5824

    @samarscript5824

    11 ай бұрын

    @@coderdost Appreciate your reply

  • @rootbattlegrounds7948
    @rootbattlegrounds7948 Жыл бұрын

    Itna aachan hota hain kya interview.. Lekin english fluent nahi hain 😔😔

  • @coderdost

    @coderdost

    Жыл бұрын

    this a college stundent interview so it seems easy,, but in live situation its not that easy

  • @rootbattlegrounds7948

    @rootbattlegrounds7948

    Жыл бұрын

    @@coderdost Ohhhk. Please upload some videos with complex coding interviews.. ✌️

  • @fullstackabhi
    @fullstackabhi Жыл бұрын

    itne easy interview bhai 😂😂

  • @coderdost

    @coderdost

    Жыл бұрын

    Its was live and time limited

  • @iganic7574
    @iganic75743 ай бұрын

    Better to have a separate function for getting cities with country name - function getCities(country) { return countries.find((i) => i.name === country)?.cities || []; }

Келесі