JavaScript DOM Coding Exercises

41) Canvas Signature Pad + Save PNG — exercise41_signature_pad.html <!doctype html> <html lang=”en”> <head> <meta charset=”utf-8″> <title>Signature Pad — Canvas + Pointer Events</title> <!– Build: Simple signature/drawing pad using <canvas> + Pointer Events with Save PNG. Objectives: – Use pointerdown/move/up/cancel to draw smooth lines on a canvas. – Handle DPR (devicePixelRatio) for crisp rendering. – … Read more

JavaScript DOM Coding Exercises

31) MutationObserver: Live DOM Change Log Build: A playground that logs DOM changes (add/remove nodes, attribute/text changes) from a target container in real time.Objectives: 32) IntersectionObserver: Lazy Images + Sentinels Build: A grid of 60 images that load only when they approach the viewport; a sentinel at the end indicates “end reached.”Objectives: 33) Drag & … Read more

JavaScript DOM Coding Exercises with code and images

11) Tabs Component (ARIA) Build: Keyboard-accessible tab interface with ARIA roles/states and panels.Objectives: 12) Accordion (ARIA) Build: Single-expand/collapse FAQ-style accordion with semantic buttons and ARIA linkage.Objectives: 13) Live Search with Debounce Build: Product cards filtered by a debounced input; matches highlighted.Objectives: 14) Countdown + Progress Bar Build: 10-second timer that updates a <progress> bar and … Read more

Learn JavaScript 10 Exercises with Code

Download PDF Download Source Code 21) DOM Traversal Visualizer Build: Click any nested element to highlight the target, its ancestors, and its siblings, and show the path to root.Objectives: closest, parents/children/siblings, DOM introspection.Steps: Open file → click around the left “tree” → watch highlights and path update.Code (save as exercise21_traversal.html) <!doctype html> <html lang=”en”> <head> … Read more

10 JavaScript DOM coding exercises

Source code Each one includes: what you’ll build, learning objectives, step-by-step instructions, a single self-contained HTML file (copy–paste into a .html file and open in a browser), and a short breakdown of how the code works. 1) Select, Read, and Update DOM Content, Attributes, and Styles What you’ll build: A tiny product list with buttons … Read more

​​10 hands-on Google Apps Script exercises focused on Google Sheets

At the end, there’s one single .gs file you can paste into your Apps Script project. It creates the sheets, seeds data, and lets you run each exercise from a custom menu. How to get set up (once) Exercise 1 — Create & Seed a “Sales” sheet Objective: Learn to create a sheet, write headers/rows, … Read more

JavaScript DOM Coding Exercises

The Document Object Model (DOM) is a programming interface for web documents. It represents the page so that programs can change the document structure, style, and content. The following exercises are designed to help you understand and practice key DOM manipulation concepts. Exercise 1: Selecting Elements Objective: Learn how to select single and multiple elements … Read more

Welcome to Vibe Coding: Your JavaScript Journey with an AI Partner

Imagine learning to code not from a static textbook, but with a personal tutor available 24/7. A tutor that can explain complex ideas in simple terms, write code examples on the fly, help you fix bugs, and brainstorm project ideas with you. That’s the essence of Vibe Coding—using AI assistants like Gemini or ChatGPT as … Read more

Vibe Coding for Beginners: Learn to Code with AI

Getting Started with Vibe Coding 1.1 What is Vibe Coding? Vibe Coding is a way of learning programming that removes fear and friction. Instead of sitting in front of a blank screen, unsure of where to begin, you describe what you want in plain English and use AI to help you turn it into working … Read more

Get Ready to Automate: An Introduction to Your Google Apps Script Exercises

How to Use These Exercises Exercise 1: Hello, World! 👋 Objective: Learn the most basic function of Apps Script: creating a function and logging a message to the execution log. Instructions: Write a script that logs the message “Hello, World!” to the console. Solution: Explanation: Exercise 2: Send a Simple Email 📧 Objective: Use the … Read more