Ask Question
31 July, 03:56

Assume that a function with this header: function amountSaved (price, discountRate, salesTaxRate) already exists. Write a single line of jа vascript code to call that function and assign the value returned from that function to a variable named saved.

+5
Answers (1)
  1. 31 July, 07:11
    0
    let saved = amountSaved (12, 0.9, 0.06);

    Explanation:

    By presuming there is a jа vascript function amountSaved () that takes three input parameters, price, discountRate & salesTaxRate. To call the function, just simply write the function name, amountSaved followed with a pair of parenthesis. Within the parenthesis, include three testing values, 12, 0.9, 0.06 as arguments. These argument values will be held by the three parameter price, discountRate and salesTaxRate, respectively.

    The function will operate on the three input values and return the result to the main program where the returned result is assigned to a variable name saved.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Assume that a function with this header: function amountSaved (price, discountRate, salesTaxRate) already exists. Write a single line of ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers