Skip to content
/ quiz2 Public

Another quiz to cover some more javascript skills

Notifications You must be signed in to change notification settings

jwabbitt/quiz2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 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.
subArray([1, 2, 3, 4]) === 10;
subArray([
  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 = ('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

No packages published