I have been sweating over this assignment. The deadline Is 6 pm tomorrow. somebody help me out.. JavaScript

  1. In JavaScript, Objects can be created in primarily 2 ways.

  2. Using Object Literals

  3. Using Objects Constructors

In not more than 7 lines, explain the

difference between Object Literals and Object constructors like you would to a 5 year old.

  1. A company is currently having their annual employee review exercise, they’ve successfully evaluated the performance of each employee, and they want to use it as a metric to determine the percentage increase in salary of each employee. They are taking the following Into consideration;

  2. Employees age.

  3. Number of years an employee has spent at the company.

  4. Performance score (1 - 10)

Employees above 30 years automatically have a $100 increase, employees over 50years automatically have a $200 increase. While the percentage increase in salary is calculated using the formula ( ( No of years / 10) * performance score).

So if a 40yr old employee’s current salary is $1000, and has spent 20years in the company with a performance score of 5. His new salary would be calculated as follows;

%raise = (20 / 10) * 5

%raise = 10%

10% of $1000 = $100

Age bonus = $100

New salary => $1000 + $100 + $100 = $1,200.

Given an Object literal of people’s name as key, and salary details (Object) as value, Calculate the following;

  1. New salary of all employees
  2. A list of employees that got over 15% overall raise.
  3. Overall payout increase by the company. I.e If the company pays a total of $100k salary to employees before the raise, and now pays $150k after the raise. The overall payout increase is $50k

Example data

{

'alfred': {

                 age: 47,

                 years: 20,

                 performance: 7,

                 salary: 10000

            },

 'john': {

                 age: 55,

                 years: 26,

                 performance: 10,

                 salary: 14000

            },

  'joshua': {

                 age: 60,

                 years: 35,

                 performance: 9,

                 salary: 20000

            },

   'daniel': {

                 age: 30,

                 years: 5,

                 performance: 7,

                 salary: 10500

            },

   'jamie': {

                 age: 40,

                 years: 14,

                 performance: 6,

                 salary: 13000

            }

}

function companyRaiseData(data){

    return {

          salaries: [{employee name: salary}, {employeeName: salary}],

           15raise: [Joshua, John],

            overallPayoutIncrease: 15,000

     }

}