Skip to content

Commit 6552b96

Browse files
authored
Update README.md
1 parent f7b7fd9 commit 6552b96

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

palindrome-checker/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# palndrome-checker
22

3-
### Concept:
3+
## Concept
44
Return true if the given string is a palindrome. Otherwise, return false.
55

66
A palindrome is a word or sentence that's spelled the same way both forward and backward, ignoring punctuation, case, and spacing.
77

8-
##### Note:
8+
### Note
99
You'll need to remove all non-alphanumeric characters (punctuation, spaces and symbols) and turn everything into the same case (lower or upper case) in order to check for palindromes.
1010

11-
### Solution:
11+
## Solution
1212
For starters you'll have to clear the string from all the non-alphanumerical characters, so:
1313
* Create a function to identify all non-alphanumerical characters
1414
* Create a function that parses a list of characters and using the first function deletes all non-alphanumerical characters
1515
* In our main function, we have to call the second function we wrote, and pass as arguments our string (as lowercase), as a list of characters.
1616

17-
### Methods used:
17+
## Methods used
1818
* list.splice(index, 1) -> removes a list's item by index
1919
* str.toLowerCase() -> converts a string to lowercase letters
2020
* str.split("") -> splits a string into an array of substrings, and returns the new array

0 commit comments

Comments
 (0)