Calculating The Tip And Total
Part of the Fundamentals section of Coddy's JavaScript journey — lesson 35 of 77.
Challenge
BeginnerCalculate the total bill amount, including the tip, and output the result. Use the provided
billAmount, tipPercentage, and numPeople variables to perform your calculations. Note that for this specific challenge, you only need to output the total bill amount including the tip.Check the hint for help!
Try it yourself
let billAmount = parseFloat(inp[0]); // Don't change this line
let tipPercentage = parseFloat(inp[1]); // Don't change this line
let numPeople = parseInt(inp[2]); // Don't change this line
// Type your code below
// Calculate the total amount including tip.
// Then, divide the total amount by numPeople to find the amount each person pays.All lessons in Fundamentals
4Operators Part 2
Logical Operators Part 1Logical Operators Part 2Recap - Simple LogicLogical Operators Part 3Type Coercion7Bill Split Calculator
Welcome MessageCalculating The Tip And Total2Variables
NumbersStringBooleanNaming ConventionsEmpty VariablesRecap - Initialize VariablesConstants3Operators Part 1
Arithmetic OperatorsModulo OperatorArithmetic ShortcutsComparison OperatorsStrict vs Loose EqualityRecap - Simple Math6Basic IO
OutputOutput with VariablesType Conversion - Part 1Type Conversion - Part 2Recap - Till 120Recap - True or False