JavaScript factory functions made simple.
🔥Get the COMPLETE course (83% OFF – LIMITED TIME ONLY): http://bit.ly/2M1sp4B
Subscribe for more videos:
https://www.youtube.com/channel/UCWv7vMbMWH4-V0ZXdmDpPBA?sub_confirmation=1
Want to learn more from me? Check out my blog and courses:
http://programmingwithmosh.com
https://www.facebook.com/programmingwithmosh/
Tweets by moshhamedani
Original source
10 responses to “JavaScript Factory Functions”
hi, factory pattern is all about creating new instances for different classes in a single method. In this video, you are creating regular functions. Are you sure that this is the right way?
I like the constructor function
How is this different to a regular function?
great clear lesson. i loved.
it is just confusing.
bORING!
great way of teaching, loved it
This tutorial could have been 2 minutes long
Hi Mosh, thanks for great videos. I have a question regarding methods. Is the method 'draw' in the above example duplicated on every object creation or is it created on the prototype? If it is duplicated for every object, then why should I favor factory functions?
Great Video!