I get this error when running the java script above js


I get this error when running the Java Script above: JS Error: TypeError: Object # has no method 'error'
var item1;
var item2;
var item3;
var item4;
var item5;
var subTtl
var tax;
var total;
// get the input values
item1 = Number(prompt("Enter item1: "));
item2 = Number(prompt("Enter item2: "));
item3 = Number(prompt("Enter item3: "));
item4 = Number(prompt("Enter item4: "));
item5 = Number(prompt("Enter item5: "));
// compute
subTtl = item1 + item2 + item3 + item4 + item5
tax = .06 * subTtl
total = tax + subTtl
// display the subTtl, tax, total
println("subTtl is " + item1 + item2 + item3 + item4 + item5 ".);
println("tax is " .06 * subTtl ".);
println("total is " + total ".);

Solution Preview :

Prepared by a verified Expert
JAVA Programming: I get this error when running the java script above js
Reference No:- TGS01249467

Now Priced at $20 (50% Discount)

Recommended (95%)

Rated (4.7/5)

©TutorsGlobe All rights reserved 2022-2023.