- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpractice.js
More file actions
Latest commit
21 lines (15 loc) · 482 Bytes
/
Copy pathpractice.js
File metadata and controls
21 lines (15 loc) · 482 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// function ispallindrome(string){
// // convert string to an array
// const arrayValues = string.split('');
// // reverse the array values
// const reverseArrayValues = arrayValues.reverse();
// // convert array to string
// const reverseString = reverseArrayValues.join('');
// if(string == reverseString) {
// return true
// }
// else {
// return false
// }
// }
// console.log(ispallindrome('racecar'))