In JavaScript you can define "static methods" or "static functions" which are functions that are defined on a class but do not actually require an instance of that class to be created.
In most cases, static methods are "helper methods" or used for creating instances of that class.
In this video I take you through a simple example of how you can define static methods on a class - we create a method used to compare two instances to give a result.
For your reference, check this out:
https://developer.mozilla.org/en-US/d...
Support me on Patreon:
/ dcode
Follow me on Twitter @dcode!
If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
In questa pagina del sito puoi guardare il video online JavaScript Classes #3: Static Methods - JavaScript OOP Tutorial della durata di ore minuti seconda in buona qualità , che l'utente ha caricato dcode 01 giugno 2018, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 35,615 volte e gli è piaciuto 740 spettatori. Buona visione!