Write an html5 page with javascript that creates a custom


In JavaScript

Write an HTML5 page with JavaScript that creates a custom object to store information about a vehicle. Create the object in an external JavaScript file. The vehicle must have at least four properties, one being direction which will have a value between 0 and 359 degrees. Add two methods called left and right which when invoked will subtract and add 10 degrees respectively to the direction property. Also add a method displayAll that will display all the properties of the custom object in an alert box. Instantiate two variables of the custom object in the tag of the HTML5 page and provide buttons for the three methods defined for each instantiation.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write an html5 page with javascript that creates a custom
Reference No:- TGS02222918

Now Priced at $20 (50% Discount)

Recommended (96%)

Rated (4.8/5)