Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Bhaskar Tejaswi
    @bhaskarcodes
    hint
    CamperBot
    @camperbot

    hint [2/8]

    # Explanation:

    You have to check if the string you get as an input is a palindrome and return true if it is, and false otherwise.

    type hint for next hint :pencil: [Contribute at the FCC Wiki]

    Bhaskar Tejaswi
    @bhaskarcodes
    hint Bonfire: Title Case a Sentence
    CamperBot
    @camperbot

    hint [3/8]

    Hint: 1

    You may use regular expressions (RegExp) to remove unwanted characters from the string.

    type hint for next hint :pencil: [Contribute at the FCC Wiki]

    Bhaskar Tejaswi
    @bhaskarcodes
    hint
    CamperBot
    @camperbot

    hint [4/8]

    Hint: 2

    You may use Array.prototype.split and Array.prototype.join methods or for loop.

    type hint for next hint :pencil: [Contribute at the FCC Wiki]

    Bhaskar Tejaswi
    @bhaskarcodes
    hint
    CamperBot
    @camperbot

    hint [5/8]

    Hint: 3

    You may lowercase the string using String.prototype.toLowerCase.

    type hint for next hint :pencil: [Contribute at the FCC Wiki]

    Bhaskar Tejaswi
    @bhaskarcodes
    hint
    CamperBot
    @camperbot

    hint [6/8]

    Spoiler Alert!

    687474703a2f2f7777772e796f75726472756d2e636f6d2f796f75726472756d2f696d616765732f323030372f31302f31302f7265645f7761726e696e675f7369676e5f322e676966.gif

    Solution ahead!

    type hint for next hint :pencil: [Contribute at the FCC Wiki]

    Bhaskar Tejaswi
    @bhaskarcodes
    hint
    CamperBot
    @camperbot

    hint [7/8]

    First

    function palindrome(str) {
      var normalizedStr = str.replace(/[\W_]/g, '').toLowerCase();
      var reverseStr = normalizedStr.split('').reverse().join('');
      return normalizedStr === reverseStr;
    }

    type hint for next hint :pencil: [Contribute at the FCC Wiki]

    Bhaskar Tejaswi
    @bhaskarcodes
    hint
    CamperBot
    @camperbot

    hint [8/8]

    Second

    function palindrome(str) {
      str = str.toLowerCase().replace(/[\W_]/g, '');
      for(var i = 0, len = str.length - 1; i < len/2; i++) {
        if(str[i] !== str[len-i]) {
          return false;
        }
      }
      return true;
    }

    Code Explanation:

    We use regular expressions to replace any uppercase letter into a lowercase. Then we check if the string is the same as the reversed string using split() to split the original string by characters, then reverse and then join it back together.

    Credits:

    If you found this page useful, you can give thanks by copying and pasting this on the main chat: Thanks @Rafase282 @abhisekp

    NOTE: Please add your username only if you have added any relevant main contents to the wiki page. (Please don't remove any existing usernames.)

    type hint for next hint :pencil: [Contribute at the FCC Wiki]

    Bhaskar Tejaswi
    @bhaskarcodes
    bonfire Title Case a Sentence
    CamperBot
    @camperbot

    :fire:Bonfire: Title Case a Sentence :link:

    function titleCase(str) {
      return str;
    }
    
    titleCase("I'm a little tea pot");

    Return the provided string with the first letter of each word capitalized.

    more info:  bf details | bf links | hint

    Kristy Burge
    @kristyburge
    This message was deleted
    CamperBot
    @camperbot
    These hints depend on people like you! Please add to this :point_right: Bonfire's Wiki Hints Page
    Don Price
    @KingHippo
    hint Chunky Monkey'
    CamperBot
    @camperbot

    hint [1/8]

    ## :construction: After this are possible spoiler hints.

    Make sure you've tried to hard to solve it yourself before proceeding. :construction:

    type hint for next hint :pencil: [Contribute at the FCC Wiki]

    Don Price
    @KingHippo
    hint
    CamperBot
    @camperbot

    hint [2/8]

    # Explanation:

    You have to check if the string you get as an input is a palindrome and return true if it is, and false otherwise.

    type hint for next hint :pencil: [Contribute at the FCC Wiki]

    Don Price
    @KingHippo
    uhh
    Craig Rufener
    @crufener
    bonfire Check for Palindromes
    CamperBot
    @camperbot

    :fire:Bonfire: Check for Palindromes :link:

    function palindrome(str) {
      // Good luck!
      return true;
    }
    
    
    
    palindrome("eye");

    Return true if the given string is a palindrome. Otherwise, return false.

    more info:  bf details | bf links | hint

    Craig Rufener
    @crufener
    hint
    CamperBot
    @camperbot

    hint [3/8]

    Hint: 1

    You may use regular expressions (RegExp) to remove unwanted characters from the string.

    type hint for next hint :pencil: [Contribute at the FCC Wiki]

    Craig Rufener
    @crufener
    hint
    CamperBot
    @camperbot

    hint [4/8]

    Hint: 2

    You may use Array.prototype.split and Array.prototype.join methods or for loop.

    type hint for next hint :pencil: [Contribute at the FCC Wiki]

    Craig Rufener
    @crufener
    hint
    CamperBot
    @camperbot

    hint [5/8]

    Hint: 3

    You may lowercase the string using String.prototype.toLowerCase.

    type hint for next hint :pencil: [Contribute at the FCC Wiki]

    Craig Rufener
    @crufener
    hint
    CamperBot
    @camperbot

    hint [6/8]

    Spoiler Alert!

    687474703a2f2f7777772e796f75726472756d2e636f6d2f796f75726472756d2f696d616765732f323030372f31302f31302f7265645f7761726e696e675f7369676e5f322e676966.gif

    Solution ahead!

    type hint for next hint :pencil: [Contribute at the FCC Wiki]

    Chaitra S
    @chaitinfin
    @bhaskarcodes split the given "str" string to an array ,access each array element,replace the the first character in the array,later join the array
    Chaitra S
    @chaitinfin
    @bhaskarcodes before that you can access the array elements to to them to lowercase,then turn them to camel case, let me know if you got it
    Abhisek Pattnaik
    @abhisekp
    @codehait pls Halt. :P
    Chaitra S
    @chaitinfin
    @abhisekp Sorry,I did'nt get you
    Abhisek Pattnaik
    @abhisekp
    @codehait i was just joking :P
    @codehait your username is codehait or code hate. So I asked you to halt your hatred towards coding. :P
    Chaitra S
    @chaitinfin
    @abhisekp it is not code hate ,it is codehait
    Abhisek Pattnaik
    @abhisekp
    @codehait yeah! I know. What does it mean?
    Abhisek Pattnaik
    @abhisekp
    @codehait i guess, my joke was a flop one. :( :-1:
    Monesul Haque
    @mones-cse
    hinthint
    CamperBot
    @camperbot

    hint [1/8]

    ## :construction: After this are possible spoiler hints.

    Make sure you've tried to hard to solve it yourself before proceeding. :construction:

    type hint for next hint :pencil: [Contribute at the FCC Wiki]

    Monesul Haque
    @mones-cse
    hint
    CamperBot
    @camperbot

    hint [2/8]

    # Explanation:

    You have to check if the string you get as an input is a palindrome and return true if it is, and false otherwise.

    type hint for next hint :pencil: [Contribute at the FCC Wiki]

    yuluska
    @yuluska
    hint
    CamperBot
    @camperbot

    hint [1/8]

    ## :construction: After this are possible spoiler hints.

    Make sure you've tried to hard to solve it yourself before proceeding. :construction:

    type hint for next hint :pencil: [Contribute at the FCC Wiki]

    yuluska
    @yuluska
    hint
    CamperBot
    @camperbot

    hint [2/8]

    # Explanation:

    You have to check if the string you get as an input is a palindrome and return true if it is, and false otherwise.

    type hint for next hint :pencil: [Contribute at the FCC Wiki]