MOTOSHARE 🚗🏍️

Rent Bikes & Cars Directly from Owners

Motoshare connects vehicle owners with people who need bikes and cars on rent. Owners earn from idle vehicles, and renters get flexible ride options.

Visit Motoshare

How does this javascript factorial function work?

JavaScript

Factory Function

When a function returns an object, we call it a factory function. It can produce object instance without new keywords or classes.

Ex:-

Factory Function with Parameter

Ex:-

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x