FREE JAVASCRIPT COURSE
Free JavaScript Course: Zero to Interview-Ready
Learn JavaScript from your first line of code to the patterns coding interviews ask about. Every lesson is interactive: write the code in your browser and check each step as you go. Try the first step of any lesson free, no sign-up needed.
PART 1
Learn to code
Coding fundamentals, from your first line of code to solving problems on your own: loops, lists, strings, functions and the basics of classes.
Welcome To JavaScript
Variables
Calculations With Numbers
Functions I
- Functions
- Defining Functions: Buggy Code
- Defining Functions: Quiz
- Calling Functions: Buggy Code
- Calling Functions: Quiz
- Functions - Execution Flow
- Execution Flow: Quiz
- Execution Flow: Buggy Code
- Why Functions
- Exercise: Create a Function
- Function Parameters & Arguments
- Parameters & Arguments: Buggy Code I
- Parameters & Arguments: Buggy Code II
- Why Parameters & Arguments
- Exercise: Create Function With Parameters
- Returning From Functions
- Returning From Functions: Quiz I
- Returning From Functions: Buggy Code I
- Returning From Functions: Quiz II
- Returning From Functions: Buggy Code II
- Returning From Functions: Quiz III
- Returning From Functions: Buggy Code III
- Returning From Functions: Quiz IV
- Returning From Functions: Buggy Code IV
Calculations - Challenges
Strings I
Strings - Challenges
Conditional Statements
Conditional Statements - Challenges
Arrays I
Arrays - Challenges
Dictionaries
Dictionaries - Challenges
For Loops - Looping Over Arrays
While Loops & For Loops
Loops & Conditionals
Loops & Global Variables
Looping Over Array Indices
Projects: Everyday Programs
- Shopping Cart 1: Single Item Total
- Shopping Cart 2: Tax and Discount
- Shopping Cart 3: Free Shipping
- Shopping Cart 4: Cart Sum
- Shopping Cart 5: Coupon Codes
- Shopping Cart 6: Group by Category
- Password Strength 1: Length Check
- Password Strength 2: Has a Digit
- Password Strength 3: Character Classes
- Password Strength 4: Count Character Classes
- Password Strength 5: Common Passwords
- Password Strength 6: Score from 0 to 100
- Report Card 1: One Subject Average
- Report Card 2: Weighted Score
- Report Card 3: Letter Grade
- Report Card 4: Multiple Students
- Report Card 5: Grades by Subject
- Report Card 6: Class Statistics
Loops - Challenges
While Loops - Challenges
Loops With Strings, Arrays & Dictionaries
Sets
Helper Functions
Nested Loops
Nested Loops Over Grids
Destructuring, Sorting & Built-ins
Strings
PART 2
Coding interviews
Big O, then the patterns behind the questions top tech companies ask, from brute force to dynamic programming.
Free Coding Interview Questions
Big O Notation
Brute Force
Sorting
Partial Sums #1
Partial Sums #2
Matrix
Two Pointers
Hash Table
- Hash Map
- Collection of Numbers
- Ransom Note
- Two Sum IV
- Hash Set
- Distinct Values II
- Remove Duplicates From Array III
- Find Duplicates
- Valid Sudoku
- Longest Subarray Without Reapeating II
- Longest Subarray with at most K Distinct Integers
- Longest Consecutive Sequence II
- Group Anagrams II
- Encode and Decode Strings
- Find The Difference II
- Intersection of Two Arrays
- Top K Frequent Elements
- LRU Cache
- Design Underground System
Binary Search
Recursion
Divide And Conquer
Backtracking
Memoization
Linked Lists
- Linked Lists
- Reverse Linked List
- Remove Linked List Elements
- Remove Nth Node From End Of List
- Remove Duplicates From Sorted Linked List
- Linked List Cycle
- Find the Duplicate Number
- Palindrome Linked List
- Intersection Of Two Linked Lists
- Add Two Numbers
- Flatten Multilevel List
- Flatten Multilevel List II
- Copy List Random Pointer
- Copy List Random Pointer II
- Merge Two Sorted Lists
- Reorder List
- Reverse Nodes in k-Group
- Merge K Sorted Lists
- Merge K Sorted Lists II
Sliding Window
Heap
Stack
Binary Trees
- Post Order Tree Traversal
- Zigzag Tree Traversal
- Symmetric Tree
- Lca In Bst
- Binary Tree Diameter
- Binary Tree Maximum Path Sum
- Kth Smallest Element In Bst
- Validate Binary Search Tree
- Count Good Nodes in Binary Tree
- Max Sum Bst
- Max Sum Bst II
- Post Order Tree Traversal II
- Maximum Depth of Binary Tree
- Balanced Binary Tree
- Invert Binary Tree
- Same Tree
- Subtree of Another Tree
- Recover Tree From Preorder
- Construct Binary Tree from Preorder and Inorder Traversal
- Serialize and Deserialize Binary Tree
- Zigzag Tree Traversal II
- Inorder Tree Traversal
- Level Order Traversal
- Binary Tree Right Side View
- Flatten Binary Tree
- Encoded Tree Sums
- Convert Sorted Array to Binary Search Tree
Tries
Dynamic Programming
- Binary Strings Of Given Length
- Permutations Of Given Length
- Valley Permutations
- Binary Strings Without Consecutive Ones
- Binary Strings With K Ones
- Binary Strings With K Ones On Even Positions
- Binary Strings With At Most K Consecutive Ones
- Permutations With K Inversions
- Digit Product Numbers
- Swap Permutations
- Best Time To Buy Stock
- Best Time To Buy Stock II
- Trapping Rain Water
- Unique Paths
- Climbing Stairs
- Min Cost Climbing Stairs
- House Robber
- House Robber II
- Decode Ways
- Maximum Product Subarray
- Best Time to Buy and Sell Stock with Cooldown
- Coin Change
- Coin Change II
- Partition Equal Subset Sum
- Word Break
- Longest Common Subsequence
- Edit Distance
- Distinct Subsequences
- Regular Expression Matching
- Longest Increasing Subsequence
- Longest Palindromic Substring
- Burst Balloons
Greedy
Intervals
Graphs
- Depth First Search (DFS): Find if Path Exists in Graph
- BFS Min Distance to Every Vertex
- Number Of Islands
- Size Of Islands
- Number of Connected Components in an Undirected Graph
- Graph Valid Tree
- Redundant Connection
- 01 Matrix
- Rotting Oranges
- Walls and Gates
- Shortest Path with Alternating Colors
- Course Schedule
- Course Schedule II
- Alien Dictionary
- Reconstruct Itinerary
- Clone Graph
- Pacific Atlantic Water Flow
- Surrounded Regions
- Dijkstra's Algorithm
- Cheapest Flights Within K Stops
- Swim in Rising Water
- Min Cost to Connect All Points
- Word Ladder
- Word Ladder II
- Word Ladder III
- Word Ladder IV
- Jump Game IV
Bit Manipulation
Object-Oriented Design - Interviews
PART 3
Projects & OOP
Your own command-line tools, then object-oriented programming: inheritance, polymorphism and interfaces, with projects to build.
Projects: Command-Line Tools
- cat 1: Print Lines
- cat 2: Number Lines (-n)
- cat 3: Show Special Characters (-A)
- cat 4: Join Several Files
- head 1: First 10 Lines
- head 2: First n Lines
- head 3: When n Is Too Big
- head 4: Negative n
- wc 1: Count Lines
- wc 2: Count Words (-w)
- wc 3: Count Characters (-c)
- wc 4: Choose What to Count
- grep 1: Lines That Match
- grep 2: Ignore Case (-i)
- grep 3: Lines That Don't Match (-v)
- grep 4: Whole Words (-w)
- uniq 1: Drop Repeated Lines
- uniq 2: Count Repeats (-c)
- uniq 3: Only Repeated Lines (-d)
- uniq 4: Only Unique Lines (-u)
- sort 1: Alphabetical Order
- sort 2: Reverse Order (-r)
- sort 3: Numeric Order (-n)
- sort 4: Sort by Column (-k)
- tr 1: Swap One Character
- tr 2: Translate a Set
- tr 3: Delete Characters (-d)
- tr 4: Squeeze Repeats (-s)
Object-Oriented Programming
- Static Members: Count the Dogs
- Access Modifiers
- Secret PIN
- Getters and Setters
- Inheritance
- Animal Sounds
- Method Overriding
- Custom Greeting
- Composition: Has-a
- Calling the Parent Method
- Polymorphism
- Pay Everyone
- Abstract Classes
- Shape Area
- Interfaces
- Printable Things
- Printing Objects
- Comparing Objects
- Errors and Exceptions
- OOP Capstone
Object-Oriented Programming - Challenges
Projects: Object-Oriented
PART 4
Backend
Build a real API yourself, a small online shop: routes, JSON, SQL, logins, payments and tests.
Backend: How The Web Works
Backend: Your First API
- Your First Route
- Send JSON
- More Routes
- One Product by ID
- When It Isn't There
- Filter with a Query String
- Two Filters at Once
- Add a Product
- Check the Input
- Remove a Product
- Update a Product (PUT)
- Change Only the Price (PATCH)
- Methods a Path Allows
- One Way to Send Errors
- JSON for Unknown Paths
- Sort the List
- Search by Name
- Only the First Few
- List the Categories
- Shop Statistics
- Reviews for a Product
- Project: The Shop So Far
Backend: SQL
- Your First Query
- Choose the Columns
- Filter Rows with WHERE
- AND and OR
- IN and BETWEEN
- Match Text with LIKE
- Missing Values: NULL
- Sort with ORDER BY
- LIMIT and OFFSET
- Distinct Values
- Count Rows
- SUM, AVG, MIN, MAX
- Group Rows with GROUP BY
- Filter Groups with HAVING
- Name Columns with AS
- Add Rows with INSERT
- Change Rows with UPDATE
- Remove Rows with DELETE
- Create a Table
- Primary Keys and Constraints
- Foreign Keys
- Join Two Tables
- LEFT JOIN
- Join Three Tables
- Revenue per Product
- A Query Inside a Query
- CASE: Labels from Values
- Indexes
- Transactions
- Project: Monthly Sales Report
Backend: APIs With A Database
- Connect the Shop to a Database
- Rows as Dictionaries
- One Product from the Database
- Search Products Safely
- Filters in SQL
- Add a Product (INSERT)
- Update a Product (UPDATE)
- Delete a Product (DELETE)
- Orders
- What an Order Contains
- Place an Order
- All or Nothing
- Pages of Results
- Too Many Queries
- Sorting Safely
- Change the Table: Migrations
- A Small Query Helper
- Project: Customers
Backend: Users And Security
- Who May Change Things?
- 401 or 403?
- Sign Up
- Never Store Passwords
- Log In
- Tokens
- Who Am I?
- A login_required Decorator
- Customers and Admins
- Sessions with Cookies
- Log Out
- Change the Password
- Too Many Tries: Rate Limits
- CORS
- Secrets Live Outside the Code
- Validate Everything
- Don't Let Clients Set Everything
- Escape What You Echo
- Only Your Own Orders
- Project: Reviews by Logged-in Users
Backend: Payments And Other Services
- Call Another API
- When the Other API Fails
- Don't Wait Forever
- Try Again, a Few Times
- Take a Payment
- Declined Cards
- Webhooks: The Provider Calls You
- Check the Webhook's Signature
- The Same Request Twice
- Send an Email
- Do It Later: A Job Queue
- A Worker
- When a Job Fails
- Upload a Photo
- Serve the Photo
- Check Uploads
- Prices in Another Currency
- Project: Checkout
Backend: Speed
Backend: Tests And Running It
Backend: Shipping It
Backend: Backend With AI
PART 5
Frontend
Build the shop's storefront yourself: HTML, CSS, the DOM, talking to an API, then React, tested in a real page.
Frontend: HTML
Frontend: CSS
Frontend: JavaScript In The Browser
- A Script on the Page
- Find Many Elements
- Read and Change Attributes
- Change Classes
- Build Elements
- Build a Card
- React to a Click
- Which Button Was It?
- State, Then Render
- Quantities and a Total
- Filter While Typing
- Handle a Form
- Say What Is Wrong
- Text Is Not HTML
- Remember the Cart
- Later: Timers
- Keys and Focus
- Project: The Cart Panel
Frontend: Talking To An API
- Ask the API
- Read the Answer
- async and await
- While You Wait
- 404 Is Not an Error to fetch
- When the Network Fails
- When the Server Fails
- Send a Search
- Don't Ask on Every Key
- The Late Answer
- Send Data: POST
- When the Server Says No
- Change and Remove
- Load More
- One Helper for Every Call
- Project: Place the Order
Frontend: React Components And State
- Your First Component
- JSX Is Not HTML
- Props
- Pass a Whole Product
- Lists and Keys
- Components Inside Components
- State
- Handlers
- State Changes on the Next Draw
- A Controlled Input
- Compute, Don't Store
- Checkboxes and Selects
- Share State: Lift It Up
- Arrays in State
- Change One Item
- Show One Thing or Another
- A Form in React
- Project: The Cart
Frontend: React Effects And Data
- Effects: After the Draw
- Load the Products from the API
- Loading
- When Loading Fails
- Ask Again When Something Changes
- The Effect That Never Stops
- Clean Up
- Ignore the Old Answer
- Change Data on the Server
- While It Saves
- Show It First, Fix It If Needed
- Your Own Hook
- A Hook That Remembers
- Refs: Reach an Element
- Project: The Product Panel
Frontend: React Routes And Shared State
- Pages Without Loading a Page
- React Router
- A Page per Product
- No Such Page
- Where Am I?
- One Frame for Every Page
- Filters in the Address
- Go There from Code
- Context: The Cart Everywhere
- A Hook for the Context
- A Reducer for the Cart
- Pages for Signed-in Visitors
- One Crash, Not a Blank Page
- Project: The Orders Pages
Frontend: Accessible, Fast, Correct
Frontend: The Project Around The Code
Frontend: Frontend With AI
- The AI Used the Index as Key
- The AI's Effect Never Stops
- The AI Changed State in Place
- A Countdown Stuck at 9
- The AI Assumed It Works
- The AI Shows the Wrong Search
- The AI Trusted the Review
- The AI's Button Is a Span
- Two Orders
- $0.30000000000000004
- The AI Copied Props into State
- Project: Review an AI Pull Request
Frontend: Interview Questions
- Debounce
- Throttle
- Write Array.prototype.map
- Write Promise.all
- An Event Emitter
- Memoize
- Deep Clone
- Curry
- An Undoable Counter
- FAQ Accordion
- Tabs
- A Modal Dialog
- Star Rating
- Autocomplete
- Multi-Step Form
- Two-Factor Code Input
- Image Carousel
- Countdown Timer
- Sortable Data Table
- Load More
- Toast Messages
- Tic-Tac-Toe
- Memory Game
- File Tree
PART 6
Full-Stack
Join your API and your storefront into one app: cookies and login, cart and checkout, errors, tests and shipping it.