A better way to learn JavaScript - Building Mini Apps
Minimum price
Suggested price

A better way to learn JavaScript - Building Mini Apps

Let's build some mini apps in JavaScript

About the Book

This book is the fourth in my 5-book series on JavaScript.

In Book 1, we learned about JS basics, with an in-depth coverage of foundations.

In Book 2, we examined all the built-in objects in depth, including their properties, methods, and constructors.

In Book 3, we went through a bunch of code snippets, simple "sub-programs" that dealt with a specific issue, such as emulating a pair of dice, or capitalizing each first letter in a sentence.

In this book, Building Mini Apps, we're continuing from simple snippets from Book 3, and we're using all the things we've learned so far to build some specific "mini apps": standalone solutions to various issues.

About the Author

Ajdin Imsirovic
Ajdin Imsirovic

Ajdin Imsirovic is a full-stack web developer who has published several courses (way back in 2015) on the subject of web design and web development. 

Before self-publishing books on Leanpub, he authored four books on front-end development for Packt Publishing:

  1. Bootstrap 4 Cookbook (Over 75 recipes to help you build elegant and responsive web applications with Bootstrap 4), June 2017
  2. Elm Web Development (An introductory guide to building funcational web apps using Elm), March 2018
  3. Vue.js Quick Start Guide (Learn how to build amazing and complex reactive web applications easily using Vue.js), October 2018
  4. Vue CLI 3 Quick Start Guide (Build and maintain Vue.js applications quickly with the standard CLI), May 2019

Bundles that include this book

Suggested Price
Bundle Price

Table of Contents

  • Chapter 1: Dynamically update a paragraph
    • Using the onchange attribute
    • Storing the values from the input into a JS variable
    • Updating the DOM with the value of the input field
    • Displaying previous user-generated text using an array
    • Clearing the input when the user has finished typing
    • Adding a space character between each of the user inputs
    • Making our code as dynamic as possible
    • Setting multiple attributes at once
  • Chapter 2: Build a multiplication table
    • How to make a multiplication table with a nested for loop
    • Bonus: Domain-name generator
  • Chapter 3: Build a Style Dynamizer
    • Understanding the basics
    • Improving the dynamizer using events
  • Chapter 4: Build a modal in vanilla JS
    • Adding styles
    • Preparing the styles for toggling the modal visibility
    • Attaching an event listener to a button
    • Adding the show class to our modal’s markup
    • Removing the show class from our modal’s markup
    • Conclusion
  • Chapter 5: Build a full-page navigation menu
    • Starting with the modal code from the previous chapter
    • Planning the updates
    • Update the HTML
    • Update the CSS
    • Remove the redundant HTML and CSS code
    • Updating the JS with updated class names
    • Conclusion
  • Chapter 6: Build a slider in vanilla JS
    • How does our simplest possible slider work?
    • Improving our slider
    • Adding the slider buttons (left and right arrows)
  • Chapter 7: Build a blog post image maker
    • Scratching our own itch
    • Preview the app live
    • Building the app from scratch
    • Getting the values from the option element using JavaScript
  • Chapter 8: Simple stopwatch
    • Building the reset functionality
    • Adding the stopwatch timer
    • Adding the Pause functionality
    • Fixing the time measurement issues
    • The cop-out solution
    • Building a stopwatch using the Date object in JS
    • Incorporating the Date updates in our interval
    • Add proper formatting to our stopwatch
  • Chapter 9: Simple timer
    • The simplest possible timer in JavaScript
  • Chapter 10: Simplest possible lightbox
    • Starting to build our lightbox
    • Adding a single image
    • Showing a larger version of the photo
    • Adding the “close modal” functionality
    • Fixing the broken styling
    • Adding additional images to our lightbox example
    • Assessing the problem to solve
    • Re-thinking our implementation
    • Putting the entire carousel into a modal
    • Adding the second image to the preview and the modal
    • Making our lightbox more realistic
    • Getting rid of the hard-coded numbers in nextSlide() and prevSlide() methods
    • Adding the close button functionality
  • Chapter 11: An accordion in JS
    • Plan the structure of our simple accordion
    • Adding styles
    • Setting up the logic using JavaScript
    • Conclusion
  • Chapter 12: A dropdown button in JS
    • Adding the HTML and CSS
    • Making the dropdown toggle display with JS
    • Updating the styles
    • Registering a click outside of the dropdown div
  • Chapter 13: A tabbed navigation in JS
    • Why tabs?
    • Tabs variations
    • Examples of tabbed navigation in use
    • Planning the HTML structure
    • Planning the CSS styles
    • Planning the JS logic
    • Writing our HTML code
    • Writing our CSS code
    • The result of our current code
    • Adding the tab panels
    • Writing the JS code
    • Setting up click event listeners on tab menu items
    • Displaying the active class on the clicked tab menu item
    • Show the appropriate tab panel on click
    • Cleaning up the previous active panels
    • The completed code
    • Conclusion
  • Chapter 14: A popover in JS
    • Popover component use cases
    • The logic of the popover component
    • Writing the popover component’s HTML code
    • Styling the popover component
    • Adding the JavaScript behavior to our popover
    • Making the popover “travel” with the button
    • Conclusion
  • Chapter 15: Sliding nav
    • The most basic sliding nav
    • Hiding the nav
    • Improving our simplest sidebar nav
    • Adding a transition using CSS
    • Revising the steps to build a sidebar sliding nav
    • Conclusion
  • Chapter 16: Tag input
  • Chapter 17: Multi-image carousel
  • Chapter 18: Zoom-in image preview
  • Chapter 19: Custom select
  • Chapter 20: Push bar
  • Chapter 21: A drag-and-drop game
  • Chapter 22: Double-sliding menu
  • Chapter 23: Counter
  • Chapter 24: Todo list
  • Chapter 25: Add-to-cart animation
  • Chapter 26: Memory game in JS
  • Chapter 27: Hangman game in JS
  • Chapter 28: Quiz app
  • Chapter 29: Typing test game
  • Chapter 30: Custom git profile
  • Chapter 31: World domination business game
  • Chapter 32: A game of pong
  • Chapter 33: A bell curve generator
  • Chapter 34: Forbidden word detector
  • Chapter 35: Whack-a-mole game
  • Chapter 36: CSS style linter
  • Chapter 37: Virtual keyboard
  • Chapter 38: Weather app
  • Chapter 39: An issue tracker
  • Chapter 40: A game of rock-paper-scissors
  • Chapter 41: A game of tic-tac-toe
  • Chapter 42: Database app with indexedDB
  • Chapter 43: JSON to CSV converter
  • Chapter 44: Notes app
  • Chapter 45: Dummy text generator
  • Chapter 46: Currency converter
  • Chapter 47: Book finder
  • Chapter 48: Movie app
  • Chapter 49: Twitter clone
  • Chapter 50: Color flipper
  • Chapter 51: Header change on scroll

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF, EPUB and/or MOBI files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub