
Build a Click Counter
There's a moment in learning JavaScript when things stop being abstract. You've studied variables and functions. You've followed along with examples. But…
Read tutorialResponding to browser and user actions through event listeners, event objects, and event propagation.
Tagged articles
18 articles in this tag.

There's a moment in learning JavaScript when things stop being abstract. You've studied variables and functions. You've followed along with examples. But…
Read tutorial
You've learned arrays, conditionals, click events, and DOM updates as separate lessons. Now it's time to see them work together. A quiz app is the perfect…
Read tutorial
You have definitely seen a modal before. You clicked a button on a website, and a small window appeared on top of the page. Everything behind it went dark.…
Read tutorial
You've clicked buttons. You've added items to a list. Now it's time to make JavaScript think.
Read tutorial
Every product you use has one: a search box that narrows a list as you type. Contact lists, product catalogs, dashboards, admin panels—they all use the…
Read tutorial
A calculator is not smart. It just remembers two numbers and one operator between clicks. Once you see that, the whole project becomes simple—and you will…
Read tutorial
An image slider looks like a piece of fancy UI magic. Underneath, it is just a number moving through an array and telling the page which image to show.…
Read tutorial
You built a list. You wired every item with a click listener. It worked. Then you added one new item, clicked it, and nothing happened. The old approach…
Read tutorial
You wrote the addEventListener line. You clicked the button. Nothing happened. No error message. No reaction. Just silence.
Read tutorial
You fill out a form, hit submit, and the whole page jumps. Everything you typed is gone. The browser did what forms do by default: it sent the data and…
Read tutorial
You have a button on your page. You want something to happen when someone clicks it. That moment—when a static page starts responding—is where JavaScript…
Read tutorial
You click a button and a menu slides open. You type in a form and it checks your input before you hit submit. You scroll and new content appears without a…
Read tutorial
You built a button. It looks great. You click it, and... nothing. The page just sits there, politely ignoring you.
Read tutorial
A button click is one quick signal. Typing is a stream of signals. Every search box, sign-up form, and chat input depends on JavaScript watching that…
Read tutorial
A to-do list is the first app where your page stops being a static document and starts remembering what the user does. Same event-listening idea as a click…
Read tutorial
You have learned how to select elements, change their content, update their styles, and create new elements from scratch. Each of those skills makes sense…
Read tutorial
You have a button. You have a menu. You want the button to hide the menu, and you want it to show the menu again when clicked a second time. If your first…
Read tutorial
You learned to select one button and make it respond to a click. Then your page grew five buttons that all need the same behavior—and your trusty…
Read tutorial