React Interview Questions | JavaScript Interview Questions | React Interview Experience

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 พ.ย. 2024

ความคิดเห็น • 74

  • @giannizamora7247
    @giannizamora7247 9 หลายเดือนก่อน +2

    The final challenge of grabbing data, displaying, pagination, ect is probably one of the closest challenges you'll have as a dev especially if you have several years of exp. I appreciate the consice approach of adding pagination functionality, there were different places while coding along where I had a different idea but ended up taking up more time to solve. Thank you

  • @RavindraSingh-lp9pl
    @RavindraSingh-lp9pl ปีที่แล้ว +8

    @its coding Doctor...we need more such projects in React. I checked your channel has just 2 projects in React please build few more. I like your teaching style.

  • @vishwasgupta605
    @vishwasgupta605 ปีที่แล้ว +13

    It was helpful please keep doing !
    my solution for que3
    const person = {
    name: "ram",
    age: 30,
    };
    const arr = [];
    for (let value in person) {
    arr.push([value, person[value]]);
    }
    console.log(arr);

    • @itscodingdoctor
      @itscodingdoctor  ปีที่แล้ว

      Awesome

    • @imam.k8114
      @imam.k8114 ปีที่แล้ว

      for in loop will also include properties from object.prototype chain which may not be desirable

  • @somnathtiwari5593
    @somnathtiwari5593 ปีที่แล้ว +11

    Thank You so much for this, I have tried learning Pagination from other youtubers too but was never able to keep the logic to write the code behind it in my mind but and you took one step at a time with explaining every step was remarkable. I dont think I will ever forget how this works now.

    • @itscodingdoctor
      @itscodingdoctor  ปีที่แล้ว +1

      Glad to hear 😊. Keep learning

    • @berndeveloper
      @berndeveloper ปีที่แล้ว

      @@itscodingdoctor ​ It's important to know that this is not the best approach to deal with pagination, it needs to be handled on the server side, not in front. This approach can be used when the total number of items is relatively small and can be easily handled by the client.

    • @jaia466
      @jaia466 ปีที่แล้ว

      ​@@berndeveloperim with this too. Imagine having to paginate a data set of thousands of data on client. This should be handled on the server. What i do is just i only pass limit and offsets from the client to my backend to grab all necessary data per page

  • @ExpertiseEra-q4c
    @ExpertiseEra-q4c ปีที่แล้ว +3

    Question 3
    const person={
    name:"Ram",
    age:30
    }
    const Newarr=[]
    for(let item in person){
    Newarr.push([item,person[item]])
    }

  • @aveesp1
    @aveesp1 ปีที่แล้ว +3

    var person = {
    firstname: "john",
    lastname: 'doe',
    age: 30
    };
    const getDetails = (obj) => {
    let arr = [];
    for(let i in obj){
    arr.push([i, obj[i]]);
    }
    return arr;
    }
    getDetails(person);
    //output as follow
    [
    [
    "firstname",
    "john"
    ],
    [
    "lastname",
    "doe"
    ],
    [
    "age",
    30
    ]
    ]

  • @MohitKumar-in3we
    @MohitKumar-in3we ปีที่แล้ว +1

    Worth Varma Worthuu.... mindblowing........

  • @arijitroy5695
    @arijitroy5695 ปีที่แล้ว +10

    Ok. I have an little improvment idea which is some times I have seen, something in pagination like this 1 | 2 | 3 | 4 | .......| 9 | 10 | 11 | 12 . when pagination number rapidly grows and you don't have option to select number of pages. So, could you please demonstrate how to do that?

    • @itscodingdoctor
      @itscodingdoctor  ปีที่แล้ว +3

      Sure, that's a great idea. I'll try to upload it soon.

  • @procoderindia
    @procoderindia ปีที่แล้ว +1

    3rd ways to solve this.
    const person = {
    name: "ram",
    age: 30,
    };
    const output = [];
    for (let key in person) {
    output.push([key, person[key]]);
    }
    console.log(output);

  • @meenatchieel7730
    @meenatchieel7730 6 หลายเดือนก่อน +1

    Its great..Really Thanks a lot for duch wonderfull real time problem solving

  • @PrasathGururmoorthy
    @PrasathGururmoorthy ปีที่แล้ว +2

    Excellent questions and coding challenge. Coding covers many concepts.

    • @itscodingdoctor
      @itscodingdoctor  ปีที่แล้ว

      Thanks 🙏

    • @itscodingdoctor
      @itscodingdoctor  ปีที่แล้ว

      Find more MNC Interview Experiences: th-cam.com/play/PLGZJDzu5NntRmgwjCg0OwFpt9yHh68Muc.html

  • @venkykp174
    @venkykp174 3 หลายเดือนก่อน

    Hello brother,
    I loved your way of explanation, simply wow
    Thankyou

  • @savatabachhav7593
    @savatabachhav7593 10 หลายเดือนก่อน +1

    Thank you so much for this. We want more such videos.

    • @itscodingdoctor
      @itscodingdoctor  5 หลายเดือนก่อน

      More to come!
      You can check the MNC interview experience playlist on this channel

  • @Shivamtech30
    @Shivamtech30 4 หลายเดือนก่อน

    let persne={
    name:"shivam",
    age:27
    }
    let array =[]
    let output = Object.entries(persne).map((items,id)=>{
    array.push(items)
    })
    console.log("mdbvsjd",array)

  • @LUFI-Munki
    @LUFI-Munki ปีที่แล้ว +1

    Great work sir, appreciate

  • @marimuthur9456
    @marimuthur9456 9 วันที่ผ่านมา

    Awesome😊

  • @ashundale
    @ashundale ปีที่แล้ว +1

    const person={
    name: "ram",
    age: 50,
    }
    const array = [];
    for(const key in person) {
    array.push([key, person[key]]);}
    array;

  • @140_nihalborkar3
    @140_nihalborkar3 ปีที่แล้ว +1

    amazing🎉

  • @decryptbykd6714
    @decryptbykd6714 ปีที่แล้ว

    const persons = {
    name: "Ram",
    age: "30"
    };
    let output = [];
    for (let key in persons) {
    output.push([key, persons[key]]);
    }
    console.log(output);

  • @AjayYadav-zp7yl
    @AjayYadav-zp7yl ปีที่แล้ว +2

    Good work bro......keep it up👍

  • @hazemkhaled9416
    @hazemkhaled9416 9 หลายเดือนก่อน

    The video is greate I actually learned some valuable things here
    but wanted to point out that I think there will be a bug in the code if the last page has different no of elements than other pages
    For Example:
    if there where 197 items last page will contain only 7 items not 10
    the bug bec indexOfLastTodo= currentPage * todosPerPage will be equal to 199 but which is wrong since the last element index will be 196
    when you try to slice the todos using the indexOfLastTodo in the last page it will cause an error as there is no item of index 199

    • @itscodingdoctor
      @itscodingdoctor  5 หลายเดือนก่อน

      I haven't tested it. I tried to create a happy flow.
      There might be more bugs/improvement space in my code (i kept it really simple to achieve the basic functionality)

  • @BhavinKalsariya-yc6gm
    @BhavinKalsariya-yc6gm ปีที่แล้ว +1

    const person = {name:"Ram", age:"30"};
    // OUTPUT
    // [
    // ['name', 'Ram'],
    // ['age', '30']
    // ]
    let arr = [];
    for(const key in person){
    arr.push([key, person[key]])
    }

  • @SumanSingh-f1q
    @SumanSingh-f1q ปีที่แล้ว +1

    Helpful

  • @do_u_dsa
    @do_u_dsa ปีที่แล้ว

    Quality content, good job!

  • @ShubhamSharma-vk9iq
    @ShubhamSharma-vk9iq ปีที่แล้ว +1

    const getObjectEntries = (obj) => {
    let arr = [];
    for (let key in obj) {
    arr.push([key, person[key]]);
    }
    return arr;
    };

    • @mynenianupama1211
      @mynenianupama1211 12 วันที่ผ่านมา

      simple console.log(Object.entries(person))

  • @ankitgiri6874
    @ankitgiri6874 ปีที่แล้ว +1

    amazing bro

  • @nitishgupta8393
    @nitishgupta8393 ปีที่แล้ว +2

    const output = Object.entries(person).map(([key, val])=> {
    return [key, val]
    })

    • @mynenianupama1211
      @mynenianupama1211 12 วันที่ผ่านมา

      simple console.log(Object.entries(person))

  • @shubhamdas6519
    @shubhamdas6519 ปีที่แล้ว +1

    thanks a lot sir....

  • @InDCoOk84
    @InDCoOk84 ปีที่แล้ว +2

    Very helpfull 🔥🔥

  • @rajesh.geesala7565
    @rajesh.geesala7565 ปีที่แล้ว +1

    thanks

  • @shankar1050
    @shankar1050 11 หลายเดือนก่อน

    the method you used to fill the array with page numbers is not good. simply you can map an index with index+1.
    but you wrote complex code(for beginners it is complex)

    • @itscodingdoctor
      @itscodingdoctor  5 หลายเดือนก่อน

      One problem has many solutions. Hardly matters (for small things) , but if you know a better solution use it by all means.

  • @sarathnath4991
    @sarathnath4991 10 หลายเดือนก่อน

    12:00 how that we can achieve by JavaScript. Bcz sometimes anchor tag to append through loop rendered as string in html page. One more q, if its cause csr then why Amazon using this approach and what are the solutions to prevent this? Pls reply

  • @arijitroy5695
    @arijitroy5695 ปีที่แล้ว +11

    Are questions really for Experienced interview. I am telling because These are really very basic and easy questions for experienced. isn't it right??

    • @itscodingdoctor
      @itscodingdoctor  ปีที่แล้ว +1

      Yes these questions are for experienced.

    • @itscodingdoctor
      @itscodingdoctor  ปีที่แล้ว +1

      In pratice level of the questions depends on multiple factors

    • @itscodingdoctor
      @itscodingdoctor  ปีที่แล้ว +1

      Interviewer and the company

  • @ayushporwal5950
    @ayushporwal5950 ปีที่แล้ว

    span as buttons?

  • @maheshappaji1273
    @maheshappaji1273 ปีที่แล้ว

    thank you👍👍👍

  • @dukesoni5477
    @dukesoni5477 ปีที่แล้ว

    interview for candidate with how much years of experience

  • @ShreyanshMehta-ov8ze
    @ShreyanshMehta-ov8ze ปีที่แล้ว

    how many years of experience is required to crack this types of interviews?

  • @Bankey_Bihari_Sarkar_Vrindavan
    @Bankey_Bihari_Sarkar_Vrindavan ปีที่แล้ว

    const person = {
    name : "Akshay",
    age : 22
    }
    let arr = [];
    for(let x in person) {
    arr.push([x, person[x]]);
    }
    console.log(arr, Object.entries(person));

    • @mynenianupama1211
      @mynenianupama1211 12 วันที่ผ่านมา

      wrong , solution is simple console.log(Object.entries(person))

  • @mkfacts3250
    @mkfacts3250 ปีที่แล้ว

    how much salary was offered to you after this interview??

    • @itscodingdoctor
      @itscodingdoctor  ปีที่แล้ว

      I had a counter offer as well. So it won't be same for everyone.

  • @wij8044
    @wij8044 ปีที่แล้ว

    All these ways to avoid using TypeScript 🤦‍♂️

    • @itscodingdoctor
      @itscodingdoctor  ปีที่แล้ว

      Typescript is gaining a lots of popularity and is highly recommended. In this interview didn't consider it though.

  • @sagarninave
    @sagarninave ปีที่แล้ว +1

    const user = {
    firstName:"sagar",
    lastName:"ninave",
    age:27
    }
    const result = Object.keys(user).reduce((acc, curr) => {
    const value = [curr, user[curr]]
    return [...acc, value]
    }, [])
    console.log( result);

  • @shubhambarore5548
    @shubhambarore5548 9 หลายเดือนก่อน +1

    const getObjectEntries = (obj) => Object.keys(obj).map((key) => [key, obj[key]]);