Question: In JavaScript - write a function to calculate 5 books times the price of one book, which is $10. Output (to the console), the total
In JavaScript - write a function to calculate 5 books times the price of one book, which is $10. Output (to the console), the total cost of the books. Need JS code as one and html SEPERATE - can't have js within html
I have this to start, but not working:
JS CODE:
function bookCost(quan, price){ return quan * price; } //write return (bookCost); //call
var quan = 5; var price = 10;
HTML CODE:
????
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
