JS help
JS help
Out of context: Reply #11
- Started
- Last post
- 13 Responses
- uan0
another detail about js syntax:
function pv(rate, years, short, fv, pd) {...};
defines a function pv that expects 5 parameters. it will take the received params and store them for the time of the function with those variable-names.
if you call pv(1,2,3,4,5); you will have inside the function pv this vars:
rate = 1; years = 2; short = 3; fv = 4; pd = 5.if you don't need to change those params before calling the function, you can just define the function like this: function pv() {...}; and call it as you did with = pv();