Skip to content

Instantly share code, notes, and snippets.

View DougCal's full-sized avatar

John Calhoun DougCal

View GitHub Profile
function palindrome(str) {
// Good luck!
var datArray = [];
var blank = [];
var isItPalin = "";
datArray = str.split("");
blank = datArray.reverse();
isItPalin = blank.join("");
// Setup
var collection = {
2548: {
album: "Slippery When Wet",
artist: "Bon Jovi",
tracks: [
"Let It Rock",
"You Give Love a Bad Name"
]
},
@DougCal
DougCal / StandInLine
Created June 14, 2016 00:16
Stand in Line Challenge freecodecamp.com
function nextInLine(arr, item) {
// Your code here
var first = arr[0];
arr.push(item);
arr.shift();
return first; // Change this line
}
// Test Setup
var testArr = [1,2,3,4,5];