Skip to content
Open
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
10 changes: 10 additions & 0 deletions 6-12_JS.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ var list1 = [
// Your task is to return the number of JavaScript developers coming from Europe.
// Use .filter

function JSDevs(babaloo) {
console.log(babaloo.filter((devs) => devs.continent == 'Europe' && devs.language == 'JavaScript').length)
}

JSDevs(list1);
// Should return 3


Expand Down Expand Up @@ -45,11 +50,16 @@ var list1 = [
}
];

list1.map((person) => {
person.greeting = 'Hi ' + person.firstName + ', what do you like the most about ' + person.language + '?';
console.log(person);
})
// The trick is to return a person, adding the property as we go
// you will need a block statement
// Use .map



// PROBLEM #3 //
// You will be given an array of objects (associative arrays in PHP) representing data about developers who have signed up to attend the next coding meetup that you are organising. The list is ordered according to who signed up first.

Expand Down