Thirty days is enough to learn the foundations of JavaScript and build several small working projects, provided you practise every day and keep the goal realistic. It is not enough to master the language, its ecosystem or a framework such as React. The aim of this plan is a solid base: by day 30 you should be able to read most beginner-level code, write your own scripts and make a web page respond to users. The plan assumes one to two hours a day and a basic familiarity with HTML.
Before day 1: set up and set expectations
You need only a browser and a code editor such as Visual Studio Code. Open the browser's developer tools (F12 on most systems) and find the Console tab: you can type JavaScript there and see results immediately. For longer code, create an HTML file that loads a script.js file and open it in the browser.
Choose one main resource and stick with it. Good free options include MDN Web Docs, maintained by Mozilla, which is the most reliable reference for the language; javascript.info, a thorough modern tutorial; and freeCodeCamp's interactive curriculum. Use the others only to look things up.
Plan for a fixed time every day. Consistency matters more than long sessions, as our guide on building a study schedule you can follow explains.
Week 1 (days 1–7): the core of the language
The first week is about the building blocks every program uses.
- Days 1–2: values and variables. Learn the basic types: numbers, strings, booleans, null and undefined. Declare variables with let and const; use const by default and let only when the value must change. Avoid the old var, which behaves in confusing ways.
- Day 3: operators and comparisons. Arithmetic, string joining and template literals with backticks. Learn early why JavaScript has both == and ===: the double version converts types before comparing, so "5" == 5 is true. Always use the triple version.
- Days 4–5: conditions and loops. if, else, switch, for and while. Write small programs: a grade calculator, a number-guessing game in the console, FizzBuzz.
- Days 6–7: functions. Declaring functions, parameters, return values and arrow functions. Understand that a variable declared inside a function is not visible outside it; this is called scope.
At the end of the week, write a short program from memory without looking at notes. Retrieving knowledge this way is far more effective than rereading, as described in our article on active recall.
Week 2 (days 8–14): working with data
- Days 8–9: arrays. Creating lists, reading and changing items, and the most useful methods: push, pop, includes, indexOf, slice and splice.
- Days 10–11: array methods that take functions. forEach, map, filter, find and reduce. These are everywhere in modern code. Practise transforming a list of products: keep only those under a price, list their names, add up their total.
- Days 12–13: objects. Properties, methods, nested objects and arrays of objects, which is how most real data looks. Learn destructuring and the spread syntax (three dots), which copy and combine objects and arrays concisely.
- Day 14: JSON and review. JSON is a text format based on JavaScript object syntax and the standard way web services exchange data. Practise JSON.stringify and JSON.parse, then review the week.
Week 3 (days 15–21): JavaScript in the browser
Now the language meets the web page. The browser represents the page as a tree of objects called the DOM (Document Object Model), and JavaScript can read and change it.
- Days 15–16: selecting and changing elements. document.querySelector, changing text with textContent, adding and removing CSS classes with classList, creating new elements and adding them to the page.
- Days 17–18: events. addEventListener for clicks, key presses and form submissions. Learn event.preventDefault() to stop a form from reloading the page.
- Days 19–20: a first real project. Build a to-do list: add tasks with a form, mark them done with a click, delete them. This single project uses nearly everything you have learned.
- Day 21: saving data. Use localStorage so the to-do list survives a page reload. You will need JSON again, because localStorage stores only strings.
Week 4 (days 22–30): asynchronous code and a final project
- Days 22–23: asynchronous thinking. Some operations, such as loading data from a server, take time. JavaScript does not stop and wait; it continues and handles the result later. Learn setTimeout, then promises, then async and await, which make asynchronous code read like normal step-by-step code.
- Days 24–25: fetching data. Use fetch to load data from a free public API, for example weather or random quotes, and display it on the page. Handle errors with try and catch, and show a message when the request fails.
- Day 26: modules and tidy code. Split code into files with import and export. Give functions clear names and keep each one focused on a single task.
- Days 27–30: final project. Build something of your own that combines the DOM, events, fetch and localStorage: a weather dashboard, a quiz game, a recipe finder or a budget tracker. Publish it for free on GitHub Pages or Netlify so you can show it to others.
How to make the 30 days actually work
- Type the code yourself. Copying and pasting skips the part where your brain learns. Typing makes you notice every bracket.
- Break things on purpose. Change a value, delete a line and predict what will happen before you run it. Reading error messages calmly is a core skill.
- Use the debugger and console.log. When something is wrong, print values or pause the code in the browser's Sources panel to see what is really happening.
- Do not get stuck for hours. Give a problem 30 to 45 minutes, then look up the answer, understand it and write it again without looking.
- Be careful with AI assistants. They are excellent for explaining an error, but if they write the exercises for you, you will finish the month without the skills. Ask for explanations, not solutions.
- Review regularly. Spend a few minutes each day revisiting earlier topics; spaced review keeps week 1 from fading while you learn week 4.
After day 30
Keep building. Rebuild your projects in a better way, learn Git properly, then study more advanced topics: how this works, closures, classes and error handling. After two or three more months of steady practice, you will be ready for a framework such as React, Vue or Svelte, or for server-side JavaScript with Node.js. The first month is not the finish line; it is the point where you stop following instructions and start making things on your own.