Reading a JavaScript tutorial and finishing one are two different experiences.
The first feels productive. The second is where you actually happen to learn. You've been grinding through JS lessons for a while and your code still lives inside someone else's exercises? Well, not for much longer.
Knowing about loops is worthless until you've used one to make something work. Tutorials teach you the words. Projects make you speak the language.
So here are 18 JavaScript projects for beginners, each with a short how-to so you know where to start. Pick one, build it, pick another.
One boring-but-important thing: the fundamentals. Get those solid and your projects won't turn into a wall of stack-overflow tabs!

Build the JavaScript Fundamentals First
All beginner JS projects lean on variables, functions, conditionals, loops, arrays, objects, and a handful of DOM methods. If those aren't second nature yet, you'll spend more time fighting syntax than building.
Coddy's JavaScript course is built for this. Five-minute lessons that walk through the core language step by step. You write and run code in the browser as you go. No setup, no environment configuration, no "install Node first."
Bugsy, our built-in AI assistant, hangs around inside every lesson when something doesn't click.
If you can read, write, and explain the following without flinching, you're ready. If not, run through the JS basics on Coddy until you can.
- Variables and primitive types (string, number, boolean)
- if/else and switch statements
- for, while, and for...of loops
- Functions and arrow functions
- Arrays and the common methods (push, pop, map, filter, find)
- Objects and dot/bracket notation
- Basic DOM access (querySelector, addEventListener, textContent)
Got those? Good. Let's build!
Coddy walks you through the fundamentals in five-minute browser lessons, with Bugsy on hand the moment something trips you up.
Starter Projects: Hello, DOM
These projects stay small on purpose. They lean on one or two concepts, so when something breaks you can find the cause fast. And hey, don't skip them because they sound simple!
1. The Classic Counter
What it is: a number on the screen with a plus button and a minus button.
Why it's good: the smallest possible app that uses HTML, CSS, and JavaScript together. You'll touch state (a variable that changes), DOM updates, and event listeners. About twenty lines of code, give or take.
How to build it: one span for the number, two buttons. Add a let count = 0. Wire click listeners on each button to bump count up or down, then update the span's textContent. Stretch goal: a reset button and a floor at zero.
2. Tip Calculator
What it is: enter a bill amount and a tip percentage, see the tip and total.
Why it's good: introduces form inputs and parseFloat, which trip up almost everyone the first time. You'll also realize how easy it is to break your math if you forget about NaN.
How to build it: two number inputs (bill, tip percentage), one button, two output spans. On click, parse both inputs, calculate, round to two decimals with .toFixed(2), display the result. Stretch goal: a split-between-people option.
3. Color Palette Generator
What it is: click a button, get a fresh random color shown as a swatch with its hex code.
Why it's good: random numbers, template literals, and inline styles in one tiny app. The output is visual, which keeps things fun.
How to build it: a function that returns a random integer between 0 and 255 three times, then a string like rgb(${r}, ${g}, ${b}). Set that as the swatch's background color. Stretch goal: a full five-color palette instead of one swatch.
4. Random Quote Generator
What it is: a button that swaps the displayed quote for a random one from your array.
Why it's good: practice with arrays and Math.random, plus a quick win you can actually share.
How to build it: define an array of quote objects with text and author. On click, pick a random index and update two elements. Stretch goal: a "tweet this quote" link that opens a pre-filled tweet.
5. Digital Clock
What it is: the current time on the screen, updating every second.
Why it's good: it's where you meet setInterval and the Date object, which you'll use forever. Padding single-digit minutes and seconds with a leading zero is its own little puzzle.
How to build it: a function that reads new Date(), formats hours, minutes, and seconds, and writes them into a span. Wrap it in setInterval(updateClock, 1000). Stretch goal: a 12-hour vs 24-hour toggle.
6. BMI Calculator
What it is: enter height and weight, get a BMI value and a category label.
Why it's good: a real-world case of conditionals picking which label to show. Also a chance to practice clean form layout, which doesn't hurt.
How to build it: number inputs for height (cm) and weight (kg). On submit, calculate BMI with the standard formula, run an if/else chain to pick a category, show both values. Stretch goal: imperial units with a toggle.
Mid-level Projects: More Moving Parts
By having done a handful of projects or so, you'll notice patterns repeating. A button click changes a variable, a function updates the UI based on that variable, repeat. That's most of frontend development. These projects ask you to juggle a bit more state at once.
7. To-do List
What it is: type a task, hit enter, it shows up in a list. Click an item to mark it done. Click the X to delete.
Why it's good: the "hello world" of frontend frameworks for a reason. You'll juggle an array, render it to the DOM, and handle two or three events. If you can build a todo list from scratch, you've graduated from total beginner.
How to build it: keep an array of task objects with id, text, and done. Re-render as a <ul> after every change. On enter, push a new task. On click, toggle done or splice the array. Stretch goal: persist to localStorage so tasks survive a refresh.
8. Stopwatch with Lap Times
What it is: a stopwatch with start, stop, reset, and a lap button.
Why it's good: trickier than the clock, because you manage your own elapsed-time variable instead of asking the system. You'll touch Date.now(), intervals, and pause logic.
How to build it: store a startTime and an elapsed accumulator. On start, set startTime = Date.now() and run an interval. On stop, do elapsed += Date.now() - startTime. On lap, push the current readout into an array and render it. Stretch goal: format milliseconds nicely.
9. Pomodoro Timer
What it is: 25 minutes of work, 5 minutes of break, repeat. Beep when it's time to switch.
Why it's good: state machines for beginners. You're in "work", "break", or "paused", and the UI shifts based on which mode you're in.
How to build it: same interval pattern as the stopwatch, but count down. Track which mode you're in. When the timer hits zero, swap modes and play a short sound with new Audio('beep.mp3').play(). Stretch goal: a counter of finished work sessions for the day.
Coddy builds the fundamentals through short daily lessons and streaks, so the harder projects stop feeling out of reach.
10. Quiz App
What it is: a multiple-choice quiz that scores you at the end.
Why it's good: combines array iteration, conditionals, and a small "screen state" idea (current question, results screen).
How to build it: define an array of question objects with text, options, and correctIndex. Show one question at a time. On answer click, check against correctIndex, bump the score, advance the index. When questions run out, show a results screen. Stretch goal: a timer per question.
11. Password Generator
What it is: pick a length and which character types to include, get a random password.
Why it's good: string manipulation, randomness, and checkbox inputs in one. Also genuinely useful, which is rare for a practice project.
How to build it: build four character pools (lowercase, uppercase, numbers, symbols). Concatenate the active pools based on checked boxes. Loop n times picking a random character from the combined pool. Stretch goal: a strength indicator that grades the output.
12. Form Validator
What it is: a sign-up form that highlights invalid fields in red and shows an error message under each one.
Why it's good: real-world JS does a lot of this. Regex, focus events, and DOM manipulation, all wrapped around a familiar form layout.
How to build it: small validator functions for each field (email pattern, password length, matching passwords). On blur, run the validator and toggle a class on the input, plus update its error span. On submit, only proceed if all validators pass. Stretch goal: live validation after the first blur.
Mini Games: Where Things Get Fun
Games push your skills further because they involve continuous state, timing, and interaction. The first time you make pixels move on a canvas, something clicks about what JavaScript actually is.
13. Rock Paper Scissors
What it is: pick rock, paper, or scissors. The computer picks too. See who wins.
Why it's good: a clean exercise in conditionals and randomness, with a satisfying win/lose moment.
How to build it: three buttons for the player's choice. On click, the computer picks randomly from the same three options. Use a small lookup (or nested if/else) to decide the outcome. Track wins and losses across rounds. Stretch goal: best-of-five with a victory screen.
14. Tic-Tac-Toe
What it is: the classic 3x3 grid game, two players taking turns on the same screen.
Why it's good: introduces a length-9 array as a flat 2D grid and the idea of checking win conditions. Nice to finish something this iconic.
How to build it: render nine cells. Track whose turn it is. On cell click, place the current player's mark and check all eight winning lines for a match. Show a winner banner when one shows up. Stretch goal: a basic AI that picks any open cell at random.
15. Memory Match
What it is: a grid of face-down cards. Click two. If they match, they stay up. If not, they flip back.
Why it's good: array shuffling, timeouts, and a clear win condition. The first time you wire up the "flip back after one second" logic, you'll really get setTimeout.
How to build it: double an array of values to make pairs, shuffle with Fisher-Yates. Render face-down. On click, reveal the card. When two are revealed, compare; if matched, lock them; if not, flip both back after a delay. End the game when all pairs match. Stretch goal: a move counter and best-score tracker in localStorage.
16. Number Guessing Game
What it is: the computer picks a number between 1 and 100. You guess. It says "higher" or "lower" until you nail it.
Why it's good: straightforward but it teaches input handling, comparisons, and a loop-until-correct pattern that shows up everywhere.
How to build it: generate a target number once. Track guesses. On each guess, compare to the target and update a feedback message. Stop accepting input once correct. Stretch goal: limit the player to seven guesses, with a game-over screen if they run out.
17. Hangman
What it is: the computer picks a word. You guess letters one at a time. Wrong guesses fill in a hangman drawing.
Why it's good: it's the project where you stop being scared of string manipulation. Building the "guessed letters" display teaches you split, map, and join in one go.
How to build it: pick a word from an array. Show one underscore per letter. As the player picks a letter, reveal matching positions or record a wrong guess. Build the hangman in stages (usually six wrong guesses allowed) using CSS or canvas. Stretch goal: load words from a public dictionary API.
18. Snake
What it is: the classic snake game, eat the food, grow longer, die if you hit yourself or the wall.
Why it's good: this is the boss-level beginner project. You'll touch a grid (canvas or CSS), keyboard events, a game loop, collision detection, and growth mechanics.
How to build it: render a grid with CSS or a <canvas>. Store the snake as an array of coordinate objects. On each tick, shift the snake one cell in the current direction. If the new head matches the food's position, grow the snake and spawn new food. If the head matches a wall or another body cell, game over. Listen for arrow keys to change direction. Stretch goal: a tick rate that speeds up as the score grows.
Bonus: A Weather App
What it is: enter a city, get the current temperature and a weather description back.
Why it's good: first real taste of a public API and async code. Any free weather API gives you enough to play with.
How to build it: grab a free API key. On submit, use fetch with the city in the URL. Await the response, parse the JSON, update the DOM with the relevant fields. Wrap it in a try/catch so bad city names don't blow up the UI. Stretch goal: a five-day forecast view.
How to Finish the Projects You Start
The list above is useless if you build half of them and abandon the rest. A few patterns that help:
- Pick the smallest one that excites you. Excitement gets you started. Smallness gets you finished. Then repeat.
- Time-box, don't scope-box. Give yourself a focused hour or two for a starter project. If you don't finish, that's information about where you got stuck, not failure.
- Build first, polish later. Get the ugly working version done before you touch CSS. Polished-but-broken is worse than ugly-but-functional.
- Don't tutorial-hop. Watching three different tutorials for the same project means you spent the time without writing any code. Build imperfectly, then look up the specific bits you don't know.
- Practice the fundamentals on days you can't build. Five minutes of Coddy on the bus is a real session. The streak adds up.
That last one ties the list together. Projects make what you've learned feel real, but they lean on the fundamentals. Short daily lessons are what keep them from feeling out of reach.
Where Coddy Fits In
This isn't a pitch for any particular tool to build the projects in. Use whatever editor you like, run things in the browser, host wherever.
The piece Coddy handles is the part that comes earlier: getting your JavaScript fundamentals solid enough that "build a quiz app" doesn't mean "spend two hours googling what .map does."
Coddy's taught JavaScript to millions of learners across web, iOS, and Android. Same lessons, same progress, same Bugsy everywhere you open it.
The free tier covers every JS lesson with no setup. You're limited only by an energy system that refills after a few hours.
Want unlimited sessions and Bugsy on every prompt? The paid tiers run at around half the price of comparable platforms. Either way: fundamentals first, projects second.
Coddy fits JavaScript into the gaps in your day with short in-browser lessons, XP, and streaks that keep you coming back.
Share this article
About the Author
Coddy Team
Editorial Team
Frequently Asked Questions
What's the best first JavaScript project for someone who's never built anything?
The counter. Sounds silly, but it covers the full HTML, CSS, and JS loop in twenty lines of code. Once you can build it without copy-pasting, every other project on this list is a variation of the same pattern.
Do I need to know HTML and CSS before building these projects?
A bit of each. You don't need to be good at CSS to make a working counter or todo list. You do need basic HTML (divs, buttons, inputs) and to use IDs and classes so your JS can find elements. The rest you pick up as you go.
How long should a beginner JavaScript project take?
Starter projects like the counter or tip calculator, an evening or two. Mid-level ones like the todo list or pomodoro, maybe a weekend. Past a week on one starter usually means something's missing from the fundamentals.
Where can I learn the JavaScript fundamentals before tackling projects?
Coddy's JavaScript course is built exactly for this. Five-minute lessons that move from variables and loops through arrays, objects, and DOM basics. Free tier, no setup, in-browser playground. Pair the lessons with one project from this list and you'll move faster than either alone.
What's the difference between practicing on a platform and building projects?
Practice builds the fundamentals fast: syntax, patterns, common methods. Projects force you to stitch those pieces together and handle the messy reality of an actual app. The fastest path is doing both.
I keep starting projects and not finishing them. What am I doing wrong?
Almost certainly picking projects too big for the time you've got. Drop down a level: if you've abandoned three todo apps, try the counter or color palette first. Finishing two small things builds way more momentum than half-doing one big thing. And keep the fundamentals fresh on days you don't build, so you're not relearning syntax when you do sit down.



