JavaScript Recipes
Practical tips and solutions for common JavaScript tasks: random numbers, async patterns, URL encoding, destructuring, and regex.

Join the AI Workshop to learn more about AI and how it can be applied to web development. Next cohort February 1st, 2026

The AI-first Web Development BOOTCAMP cohort starts February 24th, 2026. 10 weeks of intensive training and hands-on projects.


A collection of useful JavaScript recipes and tips for common programming tasks.

These are practical solutions to everyday problems you’ll encounter when writing JavaScript code, from generating random numbers to working with regular expressions.

Lessons in this unit:

0: ▶︎ Introduction
1: Generate Random Numbers in a Range
2: Get Index in for...of Loop
3: Unlimited Function Parameters
4: Return Result from Async Function
5: Encode and Decode URLs
6: Destructuring Tips
7: Number Formatting
8: Regex Recipes
9: Dynamic function name in JS