The best beginner JavaScript projects share three properties: they run in a browser with no build step, they need one idea you have not used yet, and they can be finished in a sitting or two. The list below is ordered by difficulty, and each entry says what it teaches and which single feature turns it from a tutorial exercise into something worth showing. Pick the first one you cannot already do, and finish it before reading further.
Week one and two: DOM and events#
1. Counter with a twist#
Buttons that increment, decrement and reset a number. The twist: the number changes colour past a threshold, and the page title updates too. Teaches selecting elements, listening for clicks, and keeping one piece of state in a variable rather than reading it back from the page.
2. Character counter for a text area#
Type, and a live count shows characters remaining out of a limit; the box turns red when you are over. Teaches the input event, string length, and updating the page as the user types.
3. Colour palette generator#
A button produces five random colours as swatches; click a swatch to copy its hex code. Teaches generating values, building elements in a loop, and the clipboard API. The copy-to-clipboard feature is the one people actually use.
4. Tip and bill splitter#
Enter a bill, choose a tip percentage, choose how many people, see each share. Teaches reading several inputs, doing arithmetic on strings that must become numbers, and rounding money correctly. The twist: validate that inputs are numbers and show a message instead of NaN.
5. Accordion or tabs#
Click a heading to reveal its section and collapse the others. Teaches toggling classes, working with a group of elements, and keyboard accessibility if you add arrow-key navigation. Nearly every website has one; building it once demystifies them all.
Weeks three and four: data, storage and async#
6. To-do list with persistence#
Yes, the to-do list, but with the feature that makes it real: it survives a reload. Teaches arrays of objects as state, rendering a list from data, and localStorage with JSON. Add filters for active and completed and it teaches derived state.
7. Quiz with a score#
Questions from an array, one at a time, a score at the end, and a restart. Teaches iterating through data, tracking progress, and separating the data from the display. The twist: shuffle the answer order each time.
8. Weather for a city#
Type a city, fetch the current weather from a free API, display it. Teaches fetch, promises and async/await, reading JSON, and handling a city that does not exist. The error handling is the feature.
9. Countdown timer#
Pick a date and see days, hours, minutes and seconds ticking down. Teaches Date arithmetic, setInterval, clearing the interval, and formatting numbers with leading zeros. Persist the chosen date and it combines with project 6.
10. Image gallery with a lightbox#
A grid of thumbnails; click one to open it full size with next and previous. Teaches keyboard events, overlays, and managing an index into an array. Add lazy loading and it teaches an attribute you will use on every site.
Portfolio-sized#
11. Expense tracker#
Add expenses with a category and date; see totals by category and a monthly summary. Teaches grouping and reducing data, dates, and form validation. A simple bar chart drawn with divs, no library, is the feature.
12. Markdown previewer#
Type Markdown on the left, see HTML on the right, live. Write the converter yourself for headings, bold, italics, links and lists before reaching for a library. Teaches regular expressions and string transformation, and the split-pane layout.
13. Pomodoro timer with statistics#
Work and break intervals, a sound at the end, and a log of completed sessions per day stored locally. Teaches state machines (working, on break, paused), audio, notifications, and storage. It is project 9 grown up.
14. Recipe or book search with favourites#
Search a public API, show results, star favourites that persist. Teaches debouncing input, pagination, and combining fetched data with local state. The debounce is the feature that separates it from a tutorial.
15. A small game#
Memory cards, Snake, or Minesweeper. Teaches a game loop or turn structure, a grid as an array, win and lose conditions, and rendering on a canvas or with elements. Games are the most visibly impressive project on the list and the most fun to finish.
Stopping at the right size#
Every project above has an obvious next feature, and then another. Decide the scope before you start — write three bullet points of what “done” means — and stop when they are met. A finished small project teaches more than an unfinished ambitious one, and it is the finishing that builds the habit.
Making any of them portfolio-worthy#
- A readme that says what it does and what you learned.
- Deployed somewhere with a URL, which for a single HTML file is a two-minute job on GitHub Pages.
- Working on a phone as well as a desktop.
- Handling the empty state and the error state, not just the happy path.
Questions people ask#
Do I need to know CSS first?
Enough to make things visible and lay them out. The projects are about JavaScript; keep the styling minimal until the logic works.
When should I start using React?
After project 11 or so, when you have felt the pain of keeping the page in sync with your data by hand. React solves that problem; it is hard to appreciate before you have had it.
Where do I get APIs for projects 8 and 14?
Many public APIs need no key or a free one. Search for public API lists; weather, books, recipes and films all have free options.
Can I use an AI assistant?
For explanations and reviews, yes. For writing the project, it defeats the purpose. Build it yourself, then ask the assistant what it would improve.
Where to go next#
- The to-do list project — project 6, step by step.
- The weather app project — project 8, step by step.
- Portfolio project examples — what to do with them afterwards.