Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a program in JAVASCRIPT that stores information about vehicles in an obje

ID: 3561240 • Letter: C

Question

Create a program in JAVASCRIPT that stores information about vehicles in an object. The properties to be stored should include Make, Model, Year, and Color. Write code that will display these properties using a single alert statement. I am having a really hard time with this and really need to see it with explinations. This class requires a .css .html and .js file to be created for all assignments and I'm just not getting how to do it from my text book as it only gives snippets of examples rather than showing something completed and our lectures are just poswer point slides taken from the book. Any help it greatly appreciated!!!!

Explanation / Answer

class Car

{

var Make : String;

var Model : String;

var Year : Integer;

var Color : String;

var FullName : String;

function Car (make, model, year, color) {

this.Make = make;

this.Model = model;

this.Year = year;

this.Color = color;

this.FullName = this.Year + " " + "<b>" + this.Make + "</b> " + this.Model;

}

}

var mySUV = new Car("Toyota", "4Runner SR5",2001, "Thundercloud");

document.write ("I drive a " + mySUV.FullName);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote