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!
Watch video JavaScript Classes #3: Static Methods - JavaScript OOP Tutorial online without registration, duration hours minute second in high quality. This video was added by user dcode 01 June 2018, don't forget to share it with your friends and acquaintances, it has been viewed on our site 35,615 once and liked it 740 people.