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   ·   4620 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms · UTC 00:13 · PVG 08:13 · LAX 17:13 · JFK 20:13
♥ Do have faith in what you're doing.