News for hackers. Stuff that matters.
Re:15 years trying to make everyone separate HTML, JavaScrip... by mcbits on Tuesday December 20, 2016 @08:08AM (#13219449)
It's similar to writing

    build(): string { ...
but they generate different JavaScript. The way it's written will give each instance its own reference to the function. The "build(): string" above will add the function to the prototype, which is shared by all instances.

I'm not sure whether the code takes advantage of this difference in some way or not. If not, it's just a slightly more awkward and less efficient way of defining a method.

There are no comments on this comment yet.