These are chat archives for camperbot/bonfire-check-for-palindromes

9th
Sep 2015
Jae
@jaestaar
Sep 09 2015 04:45
help
CamperBot
@camperbot
Sep 09 2015 04:45

Hi, I'm CamperBot! I can help you in this chatroom :smile:

Basic Commands:

  • find TOPIC find all entries about topic. ex: find js
  • wiki TOPIC show contents of topic page
  • thanks @username send brownie points to another user
  • about @username shows info on that user
  • bonfire BONFIRENAME info on a bonfire

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

Jae
@jaestaar
Sep 09 2015 04:45
hint
CamperBot
@camperbot
Sep 09 2015 04:45

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]

Jae
@jaestaar
Sep 09 2015 04:59
hint
CamperBot
@camperbot
Sep 09 2015 04:59

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]

Jerry Robles
@jerryrobles
Sep 09 2015 18:15
Bonfire: Validate US Telephone Numbers
CamperBot
@camperbot
Sep 09 2015 18:15

:fire:Bonfire: Validate US Telephone Numbers :link:

function telephoneCheck(str) {
  // Good luck!
  return true;
}



telephoneCheck("555-555-5555");

Return true if the passed string is a valid US phone number

more info:  bf details | bf links | hint

Jerry Robles
@jerryrobles
Sep 09 2015 18:15
hint
CamperBot
@camperbot
Sep 09 2015 18:15

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]

Jerry Robles
@jerryrobles
Sep 09 2015 18:15
hint
CamperBot
@camperbot
Sep 09 2015 18:15

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]

Jerry Robles
@jerryrobles
Sep 09 2015 18:16
hint
CamperBot
@camperbot
Sep 09 2015 18:16

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]

Jerry Robles
@jerryrobles
Sep 09 2015 18:16
hint
CamperBot
@camperbot
Sep 09 2015 18:16

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]

Jerry Robles
@jerryrobles
Sep 09 2015 18:16
hint
CamperBot
@camperbot
Sep 09 2015 18:16

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]

Jerry Robles
@jerryrobles
Sep 09 2015 18:17
hint
CamperBot
@camperbot
Sep 09 2015 18:17

hint [6/8]

Spoiler Alert!

687474703a2f2f7777772e796f75726472756d2e636f6d2f796f75726472756d2f696d616765732f323030372f31302f31302f7265645f7761726e696e675f7369676e5f322e676966.gif

Solution ahead!

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

Jerry Robles
@jerryrobles
Sep 09 2015 18:17
Bonfire: Validate US Telephone Numbers
CamperBot
@camperbot
Sep 09 2015 18:17

:fire:Bonfire: Validate US Telephone Numbers :link:

function telephoneCheck(str) {
  // Good luck!
  return true;
}



telephoneCheck("555-555-5555");

Return true if the passed string is a valid US phone number

more info:  bf details | bf links | hint

Jerry Robles
@jerryrobles
Sep 09 2015 18:17
hint
CamperBot
@camperbot
Sep 09 2015 18:17

hint [7/8]

First

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

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

Jerry Robles
@jerryrobles
Sep 09 2015 18:18
bf details
CamperBot
@camperbot
Sep 09 2015 18:18

: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.
A palindrome is a word or sentence that's spelled the same way both forward and backward, ignoring punctuation, case, and spacing.
You'll need to remove punctuation and turn everything lower case in order to check for palindromes.
We'll pass strings with varying formats, such as "racecar", "RaceCar", and "race CAR" among others.
Remember to use RSAP if you get stuck. Try to pair program. Write your own code.
links: