Skip to content

Instantly share code, notes, and snippets.

View karanjamutahi's full-sized avatar
🏠
Working from home

Karanja Mutahi karanjamutahi

🏠
Working from home
View GitHub Profile
@karanjamutahi
karanjamutahi / Filter.js
Created March 3, 2017 06:01
Trying To Filter using params
var paramArr = [];
function destroyer(arr) {
// Remove all the values
for(var i =1; i<arguments.length;++i){
paramArr.push(arguments[i]);
}
function seeker (value){
@karanjamutahi
karanjamutahi / ChunkyMonkey.js
Created March 2, 2017 04:43
Trying out code for FCC
var test = ["a", "b", "c", "d","e","f","g","h","i","j"] ;
//console.log (test.length);
function chunkArrayInGroups(array,size){
var newArray =[];
for(i = 0;i<array.length;i+=size){
var a = array.slice(i,size);
console.log(a);
console.log(i);
//Here's the problem
/*
We have an array of objects representing different people in our contacts lists.
A lookUpProfile function that takes firstName and a property (prop) as arguments has been pre-written for you.
The function should check if firstName is an actual contact's firstName and the given property (prop) is a property of that contact.
If both are true, then return the "value" of that property.