Skip to content

Instantly share code, notes, and snippets.

@rafagarcia
Created August 1, 2018 13:32
Show Gist options
  • Save rafagarcia/928860338b8e247003080c1abe3a7dc7 to your computer and use it in GitHub Desktop.
Save rafagarcia/928860338b8e247003080c1abe3a7dc7 to your computer and use it in GitHub Desktop.
Little js katah
/* Dado el siguiente array de objetos, queremos que se muestre
en consola el valor agregado de las edades de todos los
empleados con el valor de position 'engineer'.
*/
let employees = [
{
'fullName': 'Andres Urquía',
'age': 25,
'position': 'engineer'
},
{
'fullName': 'David Parra',
'age': 32,
'position': 'administrative'
},
{
'fullName': 'Ana Romero',
'age': 27,
'position': 'engineer'
},
{
'fullName': 'Ignacio García',
'age': 28,
'position': 'CTO'
},
{
'fullName': 'Sonia Del Castillo',
'age': 32,
'position': 'engineer'
},
{
'fullName': 'Manuel Salinas',
'age': 27,
'position': 'CEO'
},
{
'fullName': 'Fabio Quirós',
'age': 19,
'position': 'Bootcamp'
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment