Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

O-5 Calculate average skills for every user

Create 5 users that share the basic info like:

firstname, lastname, htmlSkills, cssSkills, and jsSkills. So in total 5 arguments, inside the constructor use 3 properties. 

this.firstName = firstName;

this.lastName = lastName;

this.skills = {html: htmlSkills, css: cssSkills, jsSkills};

Create a method that calculates the average of these 3 skills and returns the average. Find a way with what you have learned to loop through the skills property object and calculate average.

Don't create a function for every object if it's possible. Use inheritance to do it in all in one fashion.

Calculate average skills exercise

Kostas Diakogiannis
Module by Kostas Diakogiannis, updated more than 1 year ago
No tags specified