[
{
"id": 1,
"active": false,
"firstName": "Mae",
"lastName": "Jemison",
"skills": [
"Physician", "Chemical Engineer"
],
"hoursInSpace": 190,
"picture": "mae-jemison.jpg"
},
{
"id": 2,
"active": false,
"firstName": "Frederick",
"lastName": "Gregory",
"skills": [
"Information Systems", "Shuttle Pilot", "Fighter Pilot", "Helicopter Pilot", "Colonel USAF"
],
"hoursInSpace": 455,
"picture": "frederick-gregory.jpg"
},
{
"id": 3,
"active": false,
"firstName": "Ellen",
"lastName": "Ochoa",
"skills": [
"Physics", "Electrical Engineer"
],
"hoursInSpace": 979,
"picture": "ellen-ochoa.jpg"
},
]
i have no
idea
Asked
Active
Viewed 22 times
0
-
`astronauts.sort((a, b) => b.hoursInSpace - a.hoursInSpace);` – Sash Sinha Aug 19 '23 at 11:57