Useful JavaScript STRING METHODS 🧵

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

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

  • @BroCodez
    @BroCodez  ปีที่แล้ว +14

    // string methods = allow you to manipulate and work with text (strings)
    let userName = "Bro Code";
    let phoneNumber = "123-456-7890";
    //console.log(userName.length);
    //console.log(userName.charAt(0));
    //console.log(userName.indexOf("o"));
    //console.log(userName.lastIndexOf("o"));
    //userName = userName.trim();
    //userName = userName.toUpperCase();
    //userName = userName.toLowerCase();
    //userName = userName.repeat(3);
    //let result = userName.startsWith(" ");
    //let result = userName.endsWith(" ");
    //let result = userName.includes(" ");
    //phoneNumber = phoneNumber.replaceAll("-", "");
    //phoneNumber = phoneNumber.padStart(15, "0");
    //phoneNumber = phoneNumber.padEnd(15, "0");
    console.log(phoneNumber);

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

      The video was postet 33 minutes ago but the comment is 1 month old 🤨

  • @piotrmazgaj
    @piotrmazgaj 2 หลายเดือนก่อน +1

    This is my seal. I have watched the entire video, understood it, and I can explain it in my own words, thus I have gained knowledge. This is my seal.

  • @vallunacoder.wecodetogether
    @vallunacoder.wecodetogether 9 หลายเดือนก่อน +3

    dude I'm finally understanding java script!

  • @MrPvssy
    @MrPvssy 11 หลายเดือนก่อน +3

    Daddy Brocode teaches me lots

    • @chiggywiggy524
      @chiggywiggy524 6 หลายเดือนก่อน +2

      Why you always write that same comment 😭

  • @pritampatil4163
    @pritampatil4163 11 หลายเดือนก่อน +1

    superb video

  • @maenam4520
    @maenam4520 7 หลายเดือนก่อน

    Great video and It is so funny how to teach beginners the trim method and you say “hey white spaces removed from console “ where its not showing with or without trim 😂

  • @capslock3250
    @capslock3250 11 หลายเดือนก่อน +1

    Thanks

  • @em_the_bee
    @em_the_bee 11 หลายเดือนก่อน +1

    Wow, Javascript has string methods!

  • @physchopath8742
    @physchopath8742 11 หลายเดือนก่อน +1

    Can you make a tutorial on ruby aswell please

  • @jameljacobs4207
    @jameljacobs4207 19 วันที่ผ่านมา

    thnx

  • @TheConnection-d4l
    @TheConnection-d4l 22 วันที่ผ่านมา

    What is the use of strings in building app

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

    Key Insights
    🎯 The CharAt method is useful for retrieving individual characters from a string, using their corresponding index.
    🎯 The IndexOf method helps in finding the index of the first occurrence of a character in a string, which can be useful for further manipulations.
    🎯 The Length property provides a simple way to determine the length of a string, which is often needed for various operations.
    🎯 The Trim method is handy for removing leading and trailing whitespace from a string, ensuring clean input.
    🎯 The ToUpperCase and ToLowerCase methods enable easy conversion of a string to uppercase and lowercase, respectively.
    🎯 The Includes method helps in checking whether a string contains a specific substring, which is useful for conditional checks.
    🎯 String methods provide powerful tools for manipulating and working with text, enhancing the functionality of JavaScript applications.

  • @durgamolleticcbpain1846
    @durgamolleticcbpain1846 7 หลายเดือนก่อน

    node js and express js tutorils bro