Nper formula javascript. I want to simplify this function, and I need your help.

creator avatar