Guest User

Untitled

a guest
Oct 14th, 2019
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.   Dado el array "people" que figura, itéralo e incluye en un nuevo array de nombre "admitted" aquellas personas que tengan una nota igual o superior a 5, y que tengan permiso de conducir de clase A:
  3. */
  4.  
  5. var people = [
  6.   {
  7.     name: 'John',
  8.     score: 5.2,
  9.     hobbies: 'sports',
  10.     drivingLicense: 'B'
  11.   },{
  12.     name: 'Mary',
  13.     score: 9,
  14.     hobbies: 'programming',
  15.     drivingLicense: 'A'
  16.   },{
  17.     name: 'Susan',
  18.     score: 2.9,
  19.     hobbies: 'gaming',
  20.     drivingLicense: 'B'
  21.   },{
  22.     name: 'Eric',
  23.     score: 5.7,
  24.     hobbies: 'nature',
  25.     drivingLicense: 'A'
  26.   },{
  27.     name: 'Linda',
  28.     score: 5,
  29.     hobbies: 'programming',
  30.     drivingLicense: 'B'
  31.   }
  32. ]
Advertisement
Add Comment
Please, Sign In to add comment