17. Declarative programming is “the act of programming in
languages that conform to the mental model of the
developer rather than the operational model of the
machine”.
18.
19. Imperative Programming
1 function onlyAge(characters) {
2 const age = [];
3 const size = characters.length;
4
5 for (let i = 0; i < size; i++) {
6 age.push(characters[i].age);
7 }
8
9 return age;
10 }
11
12 onlyAge(characters); //[ 70, 30, 26, 35 ]