Skip to content

This is a JavaScript App from the Clever Programmer path By Qazi that's calculating bill between persons.

Notifications You must be signed in to change notification settings

Xander1936/tip-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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. **

Releases

No releases published

Packages

No packages published