Skip to content

Instantly share code, notes, and snippets.

View bryanmaina's full-sized avatar

Bryan Maina bryanmaina

View GitHub Profile
// Bonfire: Slasher Flick
// Author: @kobibr
// Challenge: http://www.freecodecamp.com/challenges/bonfire-slasher-flick?solution=function%20slasher(arr%2C%20howMany)%20%7B%0A%20%20return%20arr.splice(howMany-arr.length%2Carr.length-howMany)%3B%0A%7D%0A%0Aslasher(%5B1%2C%202%2C%203%5D%2C%202)%3B%0A
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function slasher(arr, howMany) {
return arr.splice(howMany-arr.length,arr.length-howMany);
}
slasher([1, 2, 3], 2);
@bryanmaina
bryanmaina / Gruntfile.js
Last active September 6, 2015 12:59 — forked from inkbase/Gruntfile.js
A Gruntfile to set up a Sass/Jade project
module.exports = function(grunt) {
// configure the tasks
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// copy from the source directory to build
copy: {
build: {
@bryanmaina
bryanmaina / test
Last active August 29, 2015 14:13
Public static void main () {
}