A comprehensive collection of JavaScript exercises, playground files, and learning materials from the Wes Bos Beginner JavaScript course.
beginner_javascript/
├── exercises/ # Interactive exercises and projects
├── playground/ # Code examples and practice files
├── html_basics/ # HTML fundamentals
├── sample/ # Sample code and examples
├── others/ # Additional topics (security, etc.)
├── base.css # Shared styling for exercises
└── package.json # Project dependencies
- Modern web browser (Chrome, Firefox, Safari, Edge)
- Local web server (for exercises requiring file access)
- Code editor (VS Code, Sublime Text, etc.)
-
Start a local server from the project root:
# Using Python 3 python3 -m http.server 8000 # Using Node.js (if you have http-server installed) npx http-server # Using PHP php -S localhost:8000
-
Open your browser and navigate to:
http://localhost:8000/exercises/[exercise-name]/[file-name].html
| Exercise | Description | Files |
|---|---|---|
| Arrays | Array methods and manipulation | exercises/arrays/array-methods.html |
| DOM | Document Object Model manipulation | exercises/dom/ |
| Events | Event handling and listeners | exercises/events/ |
| Forms | Form handling and validation | exercises/forms/ |
| Looping | Different types of loops | exercises/looping/ |
| Map/Filter/Reduce | Array transformation methods | exercises/map-filter-reduce/ |
| Project | Description | Special Requirements |
|---|---|---|
| Etch-a-Sketch | Drawing application | None |
| Face Detection | Real-time face detection with pixelation | Chrome with experimental features |
| Gallery | Image gallery with interactions | None |
| Sarcastic Text Generator | Text transformation tool | None |
| Topic | Description | Files |
|---|---|---|
| Debugging | Debugging techniques and tools | exercises/debugging/ |
The playground/ directory contains standalone examples for learning JavaScript concepts:
scope.html- Variable scope and closureshoisting.html- JavaScript hoisting behaviorthis.html- Understanding thethiskeywordclosures.html- Closure examples and patterns
async_await.html- Modern async/await patternspromises.html- Promise handlingapis.html- Working with external APIsstorages.html- Local storage and session storage
objects.html- Object manipulationtype.html- Type checking and conversionmap.html- Map data structurebedmas.html- Order of operations
The face detection exercise requires special browser configuration:
-
Enable experimental features in Chrome:
- Go to
chrome://flags - Search for "Experimental Web Platform features"
- Set to "Enabled"
- Restart Chrome
- Go to
-
Access the exercise:
http://localhost:8000/exercises/face_detection/face_detection.html
The html_basics/ directory contains fundamental HTML examples and structure.
The others/security/ directory includes examples of:
- CSRF (Cross-Site Request Forgery) protection
- XSS (Cross-Site Scripting) prevention
All exercises use the shared base.css file for consistent styling and layout.
- HTML Basics - Start with
html_basics/ - Core Concepts - Work through
playground/files - DOM Manipulation - Practice with
exercises/dom/ - Events & Forms - Learn interaction patterns
- Array Methods - Master data manipulation
- Projects - Build interactive applications
- Start with
playground/scope.htmlandplayground/hoisting.html - Practice with
exercises/arrays/array-methods.html - Build confidence with
exercises/dom/exercises
- Focus on
playground/async_await.htmlandplayground/promises.html - Challenge yourself with the interactive projects
- Explore the security examples in
others/security/
- Use Browser DevTools - Open F12 to inspect and debug
- Console Logging - Use
console.log()to understand code flow - Breakpoints - Set breakpoints in DevTools for debugging
- Experiment - Modify the code to see what happens
This is a learning repository. Feel free to:
- Add comments to exercises
- Create your own variations
- Share solutions with others
- Report issues or improvements
This project is for educational purposes. Please respect the original course materials and Wes Bos's work.
Happy Coding! 🚀
Remember: The best way to learn JavaScript is by doing. Don't just read the code - run it, modify it, and experiment with it!