5.Given HTML that includes the element
<p id = “ship”>shipping cost goes here</p>
what will the following code do if the user enters 100 at theprompt?
var getInfo = function() {
var cost = parseFloat(prompt(“How much does the itemcost?”));
var ship = cost * .06;
document.getElementById(“ship”).innerHTML=”Shipping: $” +ship.toFixed(2);
};
a.It will calculate the value of the ship variable, but the<p> element will remain unchanged
b.It will display “shipping cost goes here Shipping: $6.00” inthe <p> element
c.It will display NaN in the <p> element because thestarting text in this element is not a number
d.It will replace the text in the <p> element with”Shipping: $6.00″
Expert Answer
An answer will
PayPal Gateway not configured
PayPal Gateway not configured