This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bonfire: Where art thou | |
// Author: @minsooshin | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-where-art-thou | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function where(collection, source) { | |
var arr = []; | |
function check(val) { | |
var obj = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bonfire: Roman Numeral Converter | |
// Author: @minsooshin | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-roman-numeral-converter | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function convert(num) { | |
var romanMap = { | |
"M": 1000, | |
"CM": 900, | |
"D": 500, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bonfire: Diff Two Arrays | |
// Author: @minsooshin | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-diff-two-arrays | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function diff(arr1, arr2) { | |
var newArr = []; | |
function check(a1, a2) { | |
var obj = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bonfire: Sum All Numbers in a Range | |
// Author: @minsooshin | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-sum-all-numbers-in-a-range | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function sumAll(arr) { | |
var newArr = [], | |
min = Math.min(arr[0], arr[1]), | |
max = Math.max(arr[0], arr[1]); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Simple Javascript sorting implementation | |
* bubble, insert, quick | |
* @author Mason Shin | |
*/ | |
var Sortings = (function() { | |
/** | |
* privates | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
NewerOlder