JavaScript
You might say
What language makes the interactive parts of a webpage move and respond?
A programming language that makes a web page respond to actions and dataWhen someone marks a task complete, browser JavaScript can send a request, receive the updated list, and change that row on the page. JavaScript can also run on a server through Node.js, which is a different environment with different responsibilities.
Know first
JS
Why does one click change a page?
task.js
1
button.addEventListener("click", async () => {2
const task = await fetch("/api/task/1")3
row.textContent = task.done ? "Done" : "Not done"4
})○Organize meeting notes
Not clicked yet
How a click updates the interface
Handle the click:JavaScript runs the action prepared for that button.
Wait for the result:It can ask a server for an updated list, which may arrive later or fail.
Update the visible part:After the result arrives, code changes the relevant value and the browser redraws it.
Learn next
Further reading