Skip to content

Instantly share code, notes, and snippets.

Avatar

ksandoval Karla-Isabel-Sandoval

View GitHub Profile
View palindrome-checker-revised.js
//creates a loop that reverses the string
function palindromeUponReversal(str){
let reversePotentialPalindrome = "";
let regularPalindromeChecker = "";
for(let char of str){
reversePotentialPalindrome = char + reversePotentialPalindrome;
regularPalindromeChecker = regularPalindromeChecker + char;
}
if (reversePotentialPalindrome == regularPalindromeChecker){
View gist:b19d58e2ae06e5b78fd28788918a785b
{
"dependencies": {
"babel-cli": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"body-parser": "^1.19.0",
"concurrently": "^4.1.0",
"express": "^4.17.1",
"mongoose": "^5.5.14",
"morgan": "^1.9.1",