LWC Bootcamp Day 9 | Mastering Array Methods in Lightning Web Components (LWC)

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ม.ค. 2025

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

  • @sirishasirisha4405
    @sirishasirisha4405 ปีที่แล้ว +4

    Who can say like Ankit Sir from Scratch I am watching his Lwc bootcamp videos from starting onwards.Ankit Sir I became a very big fan of you Sir.Guys utilise the LWC Bootcamp.

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

      Thanks for kind words. This only motivates me to deliver best of my knowledge

  • @gauravjoshi3879
    @gauravjoshi3879 5 หลายเดือนก่อน +2

    sir, I am very lucky that i got recommendation by youtube you are best teacher of salesforce community

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

    Wow, this video is a goldmine for anyone learning JavaScript array methods! Thanks a lot Ankit

  • @srabadass7036
    @srabadass7036 6 หลายเดือนก่อน

    Hello Sir, this is the best boot camp on LWC . I am learning a lot from this series. Sir if you can do some videos on APex like How to use Map or set on real time it will be great.

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

    Thank you so much sir for this wonderful series🙏🙏

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

    Great 👍

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

    Hey Ankit, thank you for the significant contributions you've been making. I have a quick question regarding the splice method. Is param2 the index where we can add elements instead of the number of elements to be added?

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

    Thank you

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

    Hi Ankit, in a slice and splice method i want work on 2 and 5 index only, how can we achive

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

    Hi Sir, I have seen you have removed 2 videos from this playlist. Will you add more videos to this LWC Bootcamp playlist?

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

    32:00 we are adding fruits at 2nd index not 2 fruits i think

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

    Hi sir I am very big fan of you because of this boot camp, I think you have done one mistake method of splice in array first parameter is the number of the index where we want to add or remove the elements please correct me if I am wrong

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

      Yes it is the index position where we want to perform the operation.

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

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

    /*
    Write a function that takes a string as input and returns a new string with the first letter of each word capitalized.
    Example:
    Input: "hello world"
    Output: "Hello World
    Problem 2:
    Write a function that takes a string as input and returns the reverse of the string, maintaining the case of each character.
    Example:
    Input: "Hello World"
    Output: "dlroW olleH"
    Write a function that takes a string as input and returns the number of occurrences of each character in the string as an object.
    Example:
    Input: "hello"
    Output: { h: 1, e: 1, l: 2, o: 1 }
    Write a function that generate the username of the user based on Firstname, Middlename and Lastname
    Input - ankit Dilipji Jain
    Output - ADJ
    Write a function that takes an array of numbers as input and returns a new array with all the even numbers removed.
    Example:
    Input: [1, 2, 3, 4, 5, 6]
    Output: [1, 3, 5]
    Problem :
    Write a function that takes an array of strings as input and returns a new array with only the strings that have a
    length greater than or equal to 5.
    Example:
    Input: ["apple", "banana", "grape", "orange", "kiwi"]
    Output: ["apple", "banana", "orange"]
    Write a function that takes an array of numbers as input and returns a new array with only the unique elements (remove duplicates).
    Example:
    Input: [1, 2, 2, 3, 4, 4, 5]
    Output: [1, 2, 3, 4, 5]
    */

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

      Hi Ankit Sir,
      I have completed few scenarios. please review and give feedback
      //Problem 1:
      let string = "hello world";
      let splitstring = string.split(' ');
      let firstLettercaps = splitstring.map(curritem =>

      curritem[0].toUpperCase()+curritem.substring(1)
      );
      console.log("First letter caps ::",firstLettercaps.join(' '));
      //Problem 2:
      let input= "Hello World";
      console.log([...input]);
      console.log("Reverse string",[...input].reverse().join(''));
      //Problem 4:
      let userName = "ankit Dilipji Jain";
      let splitUser = userName.split(" ");
      console.log(splitUser);
      let user2 = splitUser.map((curritem) => curritem[0].toUpperCase());
      console.log("generated username::",user2.join(''));
      //or
      let userName = "ankit Dilipji Jain";
      let splitUser = userName.split(" ");
      console.log(splitUser);
      let generatedUserName="";
      for(let item of splitUser){
      generatedUserName = generatedUserName+item[0].toUpperCase();
      }
      console.log(generatedUserName);
      //Problem 5:
      let inputNumbers = [1, 2, 3, 4, 5, 6];
      let oddNumbers = inputNumbers.filter(curritem => curritem%2 != 0);
      console.log("odd numbers::", oddNumbers);
      //Problem 6:
      let myFruits = ["apple", "banana", "orange", "grape", "kiwi"];
      let filteredfruits = myFruits.filter((curritem) => curritem.length >=5);
      console.log("Fruits have length >= 5 are::",filteredfruits);
      //Problem 7:
      let inputElements= [1, 2, 2, 3, 4, 4, 5];
      let uniqueElements = new Set(inputElements);
      console.log("Unique elements", uniqueElements);

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

      @@prathyushan9791 very good attemp. Except 2nd one all looks correct. Give one more shot to second one as well

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

      @@TechJourneyWithAnkit kindly review this :
      function reverseString(input) {
      return input.split('').reverse().join('');
      }
      var input = "Hello World";
      var output = reverseString(input);
      console.log("Original: \"" + input + "\"");
      console.log("Reversed: \"" + output + "\"");

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

    57.21 will work if we remove {} curly braces between find()

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

      yes. it will work. if the arrow function has only one statement, then no need to write curly braces.