In object-oriented programming a method is a function associated with a particular class or object. In most forms of object oriented implementations methods can be static, associated with the class itself; or instance, associated with an instance of a class.

Show how to call a static or class method, and an instance method of a class.

without js -- (no class in p2js)
class test
    string msg = "this is a test"
    procedure show() ?this.msg end procedure
    procedure inst() ?"this is dynamic" end procedure
end class
test t = new()
t.show()            -- prints "this is a test"
t.inst()            -- prints "this is dynamic"
t.inst = t.show
t.inst()            -- prints "this is a test"
