V.Vidhya Logo

V.Vidhya

Methods


Q1.

Create an employee object with properties such as name, department, currentSalary, leavesCount etc.

Now add methods for this object which performs certain tasks such as,


Q2. (Adv.)

Expected Output:

Name: Cricketer123
Team: India
Role: AllRounder
Matches played: 124
Runs scored: 890
Average: 7.18
Wickets taken: 178

Q3. (Adv.)

Create a car object with properties such as modelName, type, company, fuelType, fuelTankCapacity, maxPower, mileage, seatingCapacity etc.

Now add methods for this object which performs certain tasks such as,

Expected Output:

i20 Sportz Turbo
Brand: Hyundai
Car Type: Hatchback
Fuel Type: Petrol
Fuel Tank Capacity: 40
Max Power in HP(HorsePower): 90
Mileage in KMPL(KiloMeter per Litre): 20
Seating Capacity: 5

Prev Post
Functions Cumulative II
Next Post
Object Selection & Setting Content (DOM)