Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
// Bonfire: Drop it | |
// Author: @dannycoder | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-drop-it | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function drop(arr, func) { | |
// Drop them elements. | |
while(!func(arr[0])){ | |
arr.shift(); | |
} |
// Bonfire: Sorted Union | |
// Author: @dannycoder | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-sorted-union# | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function unite(arr1, arr2, arr3) { | |
var newArray = []; | |
for(var i = 0; i < arguments.length; i++) { | |
for (var j = 0; j < arguments[i].length; j++) |
// Bonfire: Missing letters | |
// Author: @dannycoder | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-missing-letters# | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function fearNotLetter(str) { | |
//detect if the letter is missing | |
if(str.length === (str.charCodeAt(str.length - 1) - str.charCodeAt(0) + 1 )){ | |
// Bonfire: DNA Pairing | |
// Author: @dannycoder | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-dna-pairing# | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function pair(str) { | |
var returnArr = []; | |
for(var i = 0; i < str.length; i++){ | |
switch(str.charAt(i)){ |