-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforeground.js
More file actions
26 lines (19 loc) · 1000 Bytes
/
foreground.js
File metadata and controls
26 lines (19 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const sortByMostPopular = document.createElement("button")
sortByMostPopular.innerText = "Sort by most popular"
sortByMostPopular.id = "sortByMostPopular"
const sortByLeastPopular = document.createElement("button")
sortByLeastPopular.innerText = "Sort by least popular"
sortByLeastPopular.id = "sortByLeastPopular"
const sortByMostHardWorking = document.createElement("button")
sortByMostHardWorking.innerText = "Sort by most Hardworking"
sortByMostHardWorking.id = "sortByMostHardWorking"
const sortByLeastHardWorking = document.createElement("button")
sortByLeastHardWorking.innerText = "Sort by least Hardworking"
sortByLeastHardWorking.id = "sortByLeastHardWorking"
document.querySelector("body").appendChild(sortByMostPopular)
document.querySelector("body").appendChild(sortByLeastPopular)
document.querySelector("body").appendChild(sortByMostHardWorking)
document.querySelector("body").appendChild(sortByLeastHardWorking)
sortByMostPopular.addEventListener("click", () => {
main()
})