This file contains 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: @nirajkrz | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-roman-numeral-converter | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function convert(num) { | |
if (!+num) | |
return false; | |
var digits = String(+num).split(""), | |
key = ["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM", |
This file contains 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: Seek and Destroy | |
// Author: @nirajkrz | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-seek-and-destroy | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function destroyer(arr) { | |
// Remove all the values | |
var args = Array.prototype.slice.call(arguments); | |
args.splice(0,1); | |
return arr.filter(function(element) { |