Question: Javascript I have an array of names and numbers (ages). I am trying to find the highest number (age) in that array, and printing that
Javascript
I have an array of names and numbers (ages). I am trying to find the highest number (age) in that array, and printing that number along with the name associated with it.
Say the names and numbers are - Belinda 30, Kim 15, Jessica 35, Amy 56, Becky 16.
I created the array below, but I do not know how to print the information.
var array = [ {name: 'Belinda', age: 30}, {name: 'Kim', age: 15}, {name: 'Jessica', age: 35}, {name: 'Amy', age: 56}, {name: 'Becky', age: 16} ];
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
