var numbers = [1,12,4,18,9,7,11,3,101,5,6];
var strings = ['this','is','a','collection','of','words'];
var largestValue = ___;
console.log('largest number: ' + largestValue);
var longest = ___;
console.log('longest word: ' + longest);
var evens = ___;
console.log('even numbers: ' + evens);
var odds = ___;
console.log('odds numbers: ' + odds);
var wordsWithIs = ___;
console.log('words containing is: ' + wordsWithIs);
var squared = ___;
console.log('squared array: ' + squared);
var divisibleByThree = ___;
console.log('All numbers divisible by three: ' + divisibleByThree);
var joined = ___;
console.log('joined even and odd arrays: ' + joined);
var sorted = ___;
console.log('sorted array ' + sorted);
var lastWord = ___;
console.log('popped word: ' + lastWord);
___;
console.log('strings: ' + strings);
var word = ___;
console.log('removed from start: ' + word);
console.log('strings: ' + strings);
___;
console.log('added to start: ' + 'this');
console.log('strings: ' + strings);
var sliced = ___;;
console.log('subset: ' + sliced);
console.log('strings: ' + strings);
var x = ___;
console.log('removed: ' + x + ' and replaced with test, 123');
console.log(strings);
Given the following array, return an array that:
- contains only customers whose firstname starts with 'J',
- where objects have a unique key
name
that combines the firstname and lastname, - and sorted alphabetically
var customers = [
{ firstname : 'Joe', lastname : 'Blogs'},
{ firstname : 'John', lastname : 'Smith'},
{ firstname : 'Dave', lastname : 'Jones'},
{ firstname : 'Jack', lastname : 'White'}
];
var result = [
{ name : 'Jack White'},
{ name : 'Joe Blogs'},
{ name : 'John Smith'}
];
Happy Coding!!