Maharashtra State BoardHSC Arts 11th
Advertisement Remove all ads

Find out error if any in following javascript code. - Information Technology

Answer in Brief

Find out error if any in following javascript code.

var length, breadth;
length=4.5;
breadth=6;
area=1/2*length*breadth;
document.write("Area of triangle is"area);
Advertisement Remove all ads

Solution

The last line should be 

document.write("Area of triangle is " + area);
Concept: JavaScript Arithmetic Operators
  Is there an error in this question or solution?
Advertisement Remove all ads

APPEARS IN

Balbharati Information Technology (IT) 11th Standard HSC Maharashtra State Board
Chapter 3 Impressive Web Designing
Exercise | Q 6 | Page 57
Advertisement Remove all ads
Advertisement Remove all ads
Share
Notifications

View all notifications


      Forgot password?
View in app×