[Solved] Two arguments in one function call


When you see someString(), such as calcBonus(10), that’s a function call: someString is the function name, and someOptionalArgs are the arguments that the function is called with. As the book says, the argument to that second function call should be 10, so that’s what goes inside of the parentheses of calcBonus.

Arguments are separated by commas, so as you can see, you call the makeEst function with empNum (one argument) followed by a comma, followed by calcBonus(10) (another argument).

Then the result of the whole makeEst function call is assigned to est with =, which is the assignment operator.

2

solved Two arguments in one function call