Let's compare!

Report a typo

Here is a comparison table between a function and a class method. Choose the right descriptions for each element.

Choose one or more options for each row
FunctionClass Method
Can have default parameters
Has access to public fields of the class
Has access to private class functions
Has access to private fields of the class
___

Create a free account to access the full topic