Fast, Safe and Shipped
Finish like a professional: keep a search box fast with debounce, keep your page safe from injected code, and put your app online with GitHub Pages so anyone can use it. Then see where JavaScript can take you next.
Updated
Performance in JavaScript
- Debounce and Throttle (Freelancer): Debounce waits for a pause before it runs a function, throttle runs it at most once every so often, and an AbortController cancels a request that's out of date, so a busy page stays fast and shows the right answer.
Security in JavaScript
- Keeping Pages Safe: XSS and innerHTML (Journeyman): When a page puts someone else's text into innerHTML, that text can become code that runs in every visitor's browser, so you show it with textContent and createElement instead, and you keep secrets off the front end altogether.
Shipping JavaScript
- Put Your App Online with GitHub Pages (Journeyman): Build your Vite app into a dist folder, upload what's inside it to a GitHub repository through the website, switch on GitHub Pages, and check the live link, so anyone can use your app from an address you can share.
Exercise: Bookstore Search
- Exercise: Bookstore Search (Freelancer): Make a bookstore's search box fast and safe, writing a debounce function tested with fake timers, a search that finds books by title or author, and results drawn with textContent, so a title made of HTML shows as text.
Where to Go Next
- Where to Go Next (Journeyman): A look back at what you can now build with JavaScript, the two projects that put it all together (the Typing Speed Game and an app of your own), and how to choose your next step among TypeScript, a framework and Node.js on the server.