09 format correction
This commit is contained in:
parent
612360bded
commit
0afea275ee
|
@ -1,14 +1,17 @@
|
||||||
const palindromes = function (str) {
|
const palindromes = function(str) {
|
||||||
step1 = str.toLowerCase().replace(/[^a-zA-Z0-9s+]/g, "");
|
step1 = str
|
||||||
result = step1.split('').reverse().join('');
|
.toLowerCase()
|
||||||
if (result == step1){
|
.replace(/[^a-zA-Z0-9s+]/g, '');
|
||||||
console.log(result);
|
result = step1.split('').reverse().join('');
|
||||||
return true
|
if (result == step1) {
|
||||||
}else {console.log('False')}
|
console.log(result);
|
||||||
return false
|
return true;
|
||||||
|
} else {
|
||||||
};
|
console.log('False');
|
||||||
// palindromes('123, 321');
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
// palindromes('123, 321');
|
||||||
|
|
||||||
// Do not edit below this line
|
// Do not edit below this line
|
||||||
module.exports = palindromes;
|
module.exports = palindromes;
|
||||||
|
|
Loading…
Reference in New Issue