Useful JavaScript STRING METHODS 🧵

Поділитися
Вставка
  • Опубліковано 20 лип 2024
  • 00:00:00 intro
    00:00:28 .charAt()
    00:01:34 .indexOf()
    00:02:03 .lastIndexOf()
    00:02:15 .length
    00:02:40 .trim()
    00:03:13 .toUpperCase()
    00:03:22 .toLowerCase()
    00:03:28 .repeat()
    00:03:42 .startWith()
    00:05:00 .endsWith()
    00:05:18 .includes()
    00:05:43 .replaceAll()
    00:06:53 .padStart()
    00:07:35 .padEnd()
    00:07:45 conclusion
    // 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);

КОМЕНТАРІ • 13

  • @BroCodez
    @BroCodez  10 місяців тому +11

    // 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 8 місяців тому

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

  • @vallunacoder.wecodetogether
    @vallunacoder.wecodetogether 6 місяців тому +1

    dude I'm finally understanding java script!

  • @pritampatil4163
    @pritampatil4163 8 місяців тому +1

    superb video

  • @MrPvssy
    @MrPvssy 9 місяців тому +3

    Daddy Brocode teaches me lots

    • @chiggywiggy524
      @chiggywiggy524 4 місяці тому +2

      Why you always write that same comment 😭

  • @capslock3250
    @capslock3250 8 місяців тому +1

    Thanks

  • @em_the_bee
    @em_the_bee 8 місяців тому +1

    Wow, Javascript has string methods!

  • @maenam4520
    @maenam4520 5 місяців тому

    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 😂

  • @physchopath8742
    @physchopath8742 8 місяців тому +1

    Can you make a tutorial on ruby aswell please

  • @Inspire_Transform
    @Inspire_Transform Місяць тому

    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 4 місяці тому

    node js and express js tutorils bro