Link to home
Start Free TrialLog in
Avatar of stargateatlantis
stargateatlantis

asked on

Why is this returning NAN NAN NAN

If you look at the following function how come this is returning NAN NAN NAN and how to fix it.

var Maths = {
  numbers: [1, 2, 3],
  multiplier: 2,
  multiplied: function () {
    return this.numbers.map(function(n) {
      return n * this.multiplier;
    });
  }
};

Maths.multiplied(); // [NaN, NaN, NaN]

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial