Method parameters

suggest change

If you want to pass in values to a method when it is called, you use parameters:

- (int)addInt:(int)intOne toInt:(int)intTwo {
  return intOne + intTwo;
}

The colon (:) separates the parameter from the method name.

The parameter type goes in the parentheses (int).

The parameter name goes after the parameter type.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Methods:
*Method parameters

Table Of Contents