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!
En esta página del sitio puede ver el video en línea JavaScript Classes #3: Static Methods - JavaScript OOP Tutorial de Duración hora minuto segunda en buena calidad , que subió el usuario dcode 01 junio 2018, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 35,615 veces y le gustó 740 a los espectadores. Disfruta viendo!