Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Ordinary Method Call#

Sumit Rawal answered on May 23, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • What is the difference between ordinary method calls and operator method calls?

  • Ordinary Method Call#

    0

    The more widely known and used method call is the same one we used in our indexOf example.


    In this method call, the object we are calling the method on, and the method name are separated by . while the arguments to the method are passed in ().

    Method Call Using Operator Notation

    You can also call a method like you would use an operator such as +. The method in this would be acting as an operator.


    Let’s modify the indexOf example in such a way that it uses the operator notation.

    Popularity 1/10 Helpfulness 1/10 Language python
    Source: Grepper
    Tags: python
    Link to this answer
    Share Copy Link
    Contributed on May 23 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.