https://github.com/xander1936/tip-calculator
This is a JavaScript App from the Clever Programmer path By Qazi that's calculating bill between persons.
https://github.com/xander1936/tip-calculator
anonymous-functions arrow-functions css dom dom-manipulation functions html javascript jsx template-literals
Last synced: 4 months ago
JSON representation
This is a JavaScript App from the Clever Programmer path By Qazi that's calculating bill between persons.
- Host: GitHub
- URL: https://github.com/xander1936/tip-calculator
- Owner: Xander1936
- Created: 2022-12-01T23:59:51.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2026-03-26T07:58:30.000Z (5 months ago)
- Last Synced: 2026-03-27T02:44:25.887Z (5 months ago)
- Topics: anonymous-functions, arrow-functions, css, dom, dom-manipulation, functions, html, javascript, jsx, template-literals
- Language: JavaScript
- Homepage: https://xander1936.github.io/tip-calculator/
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tip-calculator
This is JavaScript App from the Clever Programmer By Qazi that's calcualating bill between persons.
/*
🌟 APP: Tip Calculator
These are the 3 functions you must use 👇
=========================================
calculateBill()
increasePeople()
decreasePeople()
These functions are hard coded in the HTML. So, you can't change their names.
These are all the DIV ID's you're gonna need access to 👇
========================================================
#1 ID 👉 'billTotalInput' = User input for bill total
#2 ID 👉 'tipInput' = User input for tip
#3 ID 👉 'numberOfPeople' = Current number of people you're splitting the bill between
#4 ID 👉 'perPersonTotal' = Total dollar value owed per person
*/
// Get global access to all inputs / The divs here (you'll need them later 😘)
// bill input, tip input, number of people div, and per person total div
// numberOfPeople variable gets number of people from number of people div; captures the string from the user input
// and turns it into a number with the JavaScript Number() method
// **The calculateBill() arrow function Calculates the total bill per person **
// **The increasePeople() arrow function incrases the number of the persons thats have to pay the bill. **
// **The decreasePeople() arrow function decrases the number of the persons thats have to pay the bill. **