Skip to content

ktjackbelle/quiz2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quiz2

This quiz is test some more knowledge of some javascript skills you'll need to have in a web development job.

  1. Longest String - Given an array of items, return the longest string in the array. There may be things that aren't strings passed into the array.
longestString([
  'foo',
  'bar',
  'test'
]) === 'test';

longestString([
  573927,
  {foo: 'bar'},
  ['hello', 'world', 'i', 'am', 'sentient'],
  'blah'
]) === 'blah';
  1. arraySum - Given an array, sum up all of the items in the array, and in all of the sub-arrays.
arraySum([1, 2, 3, 4]) === 10;
arraySum([
  10,
  [1, 2, 3, 4],
  [1, [2, 3], 4]
]) === 30;
  1. bindName - Given a first name, last name, and a function, return a new function who's first argument will always be the first and last names combined with a space between them.
let helloMe = bindName('Keith', 'Smith', function (name, message) {
  return message + ', ' + name;
});
helloMe('Hello') === 'Hello, Keith Smith';

Resources

About

Another quiz to cover some more javascript skills

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%