Modern JavaScript
About Lesson

In this JavaScript lesson we are going to talk about JavaScript Static Functions, so static functions are defined in classes itself not on the prototype, it means that we can not call static functions on the object, but we can call it on the class name.

 

 

Now let’s create an example, you can see that we have static function in our class, you can not access to this static function using the class object.

 

 

 

You can access to that static function using the class name it self not the object.

 

 

Thank you for visiting my website! If you enjoyed the free courses, please consider supporting my works on Patreon.
Exercise Files
No Attachment Found
No Attachment Found