In the following code, name the data types used, describe the scope for the variables, and spot the:
statement
, variable
, expression
,
operator
, function
, argument
, and return value
.
function calculateTip(total) { var tipPercent = 0.15; return (total * tipPercent); } var billTotal = 10.00; var billTip = calculateTip(billTotal); var receipt = 'Total: ' + billTotal + ' Tip: ' + billTip; console.log(receipt);