Skip to content

Instantly share code, notes, and snippets.

@roadev
Last active November 28, 2017 02:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roadev/193f36064b106cab0d9236e62df49c6d to your computer and use it in GitHub Desktop.
Save roadev/193f36064b106cab0d9236e62df49c6d to your computer and use it in GitHub Desktop.

Data

const a = [1, 3, 4, 6, 12, 15, 23, 20];

const b = ['a', 'once a time', 'machine learning', 'beer', 'bear', 'beat'];

const c = [ { key1: 'abc' }, { key2: 1.2 }, { key3: false }, { key4: null }, { key5: undefined }, { key6: '' } ];

Challenges

  1. Return a list with only odd numbers (for a).
  2. Return a list with all values multiplied by 2 (for a).
  3. Return a list with all the values that includes 'be' (for b).
  4. Return a list with all the false values (for c).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment