Skip to content

partly-done #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions starter-code/lib/harryPotter.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
var _ = require('lodash');



var birthdays = ["Severus Snape", "9 January", "Arthur Weasley", "6 February",
"Ron Weasley", "1 March", "Remus Lupin", "10 March",
"Fred & George Weasley", "1 April", "Pomona Sprout", "15 May",
Expand All @@ -8,3 +12,34 @@
"4 October", "Filius Flitwick", "17 October", "Molly Weasley",
"30 October", "Bill Weasley", "29 November", "Rubeus Hagrid",
"6 December", "Charlie Weasley", "12 December"];

var moreBirthdays = ["Lily Evans", "30 January", "James Potter", "27 March",
"Dudley Dursley", "30 June", "Tom Riddle", "31 December"];


_.chunk(birthdays,2);
var newBirthday = _.chunk(birthdays,2);
console.log(newBirthday);


function addTwoArrays(add) {
return moreBirthdays.push(birthdays);
}

console.log(addTwoArrays);




_.chunk(birthdays,2);
var newBirthday = _.chunk(birthdays,2);
console.log(newBirthday);

_.chunk(moreBirthdays,2);
var newMoreBirthdays = _.chunk(moreBirthdays, 2);

console.log(newMoreBirthdays);

function addAllBirthdays (add) {
return moreBirthdays.push(birthdays);
}
35 changes: 35 additions & 0 deletions starter-code/lowdash.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
var _ = require('lodash');
var opinions = [ "This is the best job ever",
"Satisfied",
"At least I get paid",
"I'm looking for another job",
"I don't want to answer"];



function selectRandomOpinion(arrayy) {

var number = Math.floor(Math.random() * arrayy.length);
return arrayy[number];

}

console.log(selectRandomOpinion(opinions));

function tenTimes(opinions){
return _.times(10, function(){
return selectRandomOpinion(opinions);
});

}

console.log(tenTimes(opinions));


function fivetimes(array){
return (_.times(5, function(){
return tenTimes(array);
}));
}

console.log(fivetimes(opinions));
Empty file added starter-code/password.js
Empty file.