Create a parent object, named car, with the brand 'Toyota' and year '2019'. Then, create a prototyping instance of the car object, named 'myCar', with the properties 'type' set to 'automobile', 'name' set to 'Camry', and 'color' set to 'silver'.
Objects Prototyping
Creating Custom Car Instances
Report a typo
Sample Input 1:
Sample Output 1:
Brand: Toyota
Year: 2019
Type: automobile
Name: Camry
Color: silverWrite a program in JavaScript
// write your code here
/* Do not change code below */
console.log(`Brand: ${myCar.brand}`);
console.log(`Year: ${myCar.year}`);
console.log(`Type: ${myCar.type}`);
console.log(`Name: ${myCar.name}`);
console.log(`Color: ${myCar.color}`);
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.