Windlike's recent timeline updates
Windlike

Windlike

V2EX member #337964, joined on 2018-08-02 13:41:29 +08:00
Windlike's recent replies
原型方法通过 ClassName.prototype.fn = function(){}这样去定义,通过实例去调用:
const instance = new ClassName();
instance.fn();

而静态方法(static)通过 ClassName.staticFn = function() {}来定义,通过类本身就可以调用:
ClassName.staticFn();
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1186 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms · UTC 23:14 · PVG 07:14 · LAX 16:14 · JFK 19:14
♥ Do have faith in what you're doing.