Table of Contents
🎪 We will be building a Button-to-Emoji application with buttons and a list using Event-driven programming and The Event Loop!
Event-driven programming is like ordering food at a restaurant. You sit patiently waiting, taking no action, until the waiter brings your meal. This signals an event has occurred, triggering you to eat. Similarly in code, functions wait idle until an event like a click or keyboard input happens. Event handlers are then called to respond appropriately. This creates responsive programs that don't constantly check for changes, improving efficiency.
-
Create Repo from Use Template:
- Click HERE or the
Use Templatebutton in this repo to create a new repo. - Ensure
Include all branchesis left unchecked. - Specify your username and repo name appropriately.
- Provide a description for the repo (optional).
- Set the repo as
Public. - Click
Create repository.
- Click HERE or the
-
Clone your Repo:
- Click the
<> Codebutton in this repo and chooseSSH. - Copy the URL. It should look something like:
git@github.com:YOUR-USERNAME/YOUR-REPO-NAME.git. - In your terminal, navigate to the directory where you want to clone this repo.
- Execute
git clone git@github.com:YOUR-USERNAME/YOUR-REPO-NAME.git, replacing the placeholders with actual values.
- Click the
-
Start the application:
- Open
Finderand navigate to the project folder containing theindex.htmlfile. - Right-click on the
index.htmlfile. - In the right-click menu, select Open With > Chrome (or your preferred browser).
- The
index.htmlwill now open directly in the chosen browser.
- Open
The UI should open in your chosen web browser to the correct URL.
NOTE: When you make changes to the HTML or related CSS/JS files, you will need to manually refresh the browser to see the updates.
Follow along with your instructor to create a splendid Button-to-Emoji application! Happy Priming!