Skip to content Skip to sidebar Skip to footer

Operation Not Working When Using Number Properties (returns Nan)

What's the problem in using number properties? I'm trying to do a simple calculation involving numbers and it returns NaN. function test () { var that = this; this.usersCo

Solution 1:

You misspelled the name of your variable. Use that.totalSeeds instead of that.totalseeds.

Solution 2:

You have a typo:

var percentUsersCount = that.usersCount / that.totalseeds * 100;

Change to

var percentUsersCount = that.usersCount / that.totalSeeds * 100;

Post a Comment for "Operation Not Working When Using Number Properties (returns Nan)"