Skip to content

Commit 264a4cd

Browse files
committed
Added bonus mission LaunchCodeEducation#1 - sort by hours in space
1 parent b1eb6bc commit 264a4cd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

script.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
window.addEventListener("load", event => {
22
fetch("https://handlers.education.launchcode.org/static/astronauts.json").then(response => {
33
response.json().then(json => {
4+
json.sort( (a,b) => {return b.hoursInSpace - a.hoursInSpace});
45
console.log(json);
56
const con = document.getElementById("container");
67

0 commit comments

Comments
 (0)