Skip to content
Advertisement

Function returns Nan returns when I send More argument then function parameters

I couldn’t understand why it send the nan when I pass more arguments than parameters

JavaScript

Advertisement

Answer

You pass into percetageofworld3 two parameter but the function have just one, so you pass country for example ‘italy’ and it will be return ('italy' / 7900) * 100;

If you pass only number work

JavaScript
Advertisement