-
Notifications
You must be signed in to change notification settings - Fork 22
/
2-validCandidates.js
30 lines (27 loc) · 1.28 KB
/
2-validCandidates.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
'use strict'
/*
* Create a function `validCandidates` that takes an array of users
* and returns only those which age is between 18 & 25 (both included)
*
* Créer une fonction `validCandidates` qui prend un array d'utilisateurs
* et retourne seulement ceux qui ont entre 18 et 25 ans (inclus)
*
*/
const users = [
{ name: 'kouame fofana', email: '[email protected]', age: 19 },
{ name: 'seydou koné', email: '[email protected]', age: 23 },
{ name: 'abdoulaye koné', email: '[email protected]', age: 18 },
{ name: 'fanta bamba', email: '[email protected]', age: 26 },
{ name: 'karidja coulibaly', email: '[email protected]', age: 21 },
{ name: 'siaka traoré', email: '[email protected]', age: 18 },
{ name: 'ahou bakayoko', email: '[email protected]', age: 27 },
{ name: 'naminata dao', email: '[email protected]', age: 20 },
{ name: 'naminata koné', email: '[email protected]', age: 23 },
{ name: 'awa coulibaly', email: '[email protected]', age: 17 },
{ name: 'drissa coulibaly', email: '[email protected]', age: 20 },
{ name: 'adjoua traoré', email: '[email protected]', age: 25 },
{ name: 'aya dao', email: '[email protected]', age: 18 },
{ name: 'siaka koné', email: '[email protected]', age: 22 },
{ name: 'sita touré', email: '[email protected]', age: 24 },
]
// Your code :