Can anyone please tell me how to do this correctly? I'm trying
to learn javascript and I've taken it as far as I can and I'm
extremely frustrated!
TIA
Neill
var L = prompt("Enter the length of carpet");
var W = prompt("Enter the width of carpet");
var C = prompt("Enter the cost per unit");
function carpet_cost(L,W ,C)
{
var area = L * W;
var carpet_cost=(ar ea * C);
}
return carpet_cost
window.alert ("The total cost of the carpet is", carpet_cost);
--
Wayfarer
Journeys: http://www.journeys.ws/
Live light, dream true, burn bright...
to learn javascript and I've taken it as far as I can and I'm
extremely frustrated!
TIA
Neill
var L = prompt("Enter the length of carpet");
var W = prompt("Enter the width of carpet");
var C = prompt("Enter the cost per unit");
function carpet_cost(L,W ,C)
{
var area = L * W;
var carpet_cost=(ar ea * C);
}
return carpet_cost
window.alert ("The total cost of the carpet is", carpet_cost);
--
Wayfarer
Journeys: http://www.journeys.ws/
Live light, dream true, burn bright...
Comment