JavaScript Tutorial For Beginners #30 – Constructor Functions




Hey ninjas, I think it’s about time we started using constructor functions to create our objects! So in this JavaScript tutorial for beginners I’ll introduce it to you!

The constructor function is useful if you are creating many objects of the same ‘type’ – e.g. many different Car objects. It promotes DRY code (don’t repeat yourself) and saves a lot of time when creating many objects!

Any questions, fire away 🙂

SUBSCRIBE TO CHANNEL – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg?sub_confirmation=1

========== JavaScript for Beginners Playlist ==========

========== CSS for Beginners Playlist ==========

========== HTML for Beginners Playlist ==========

========== The Net Ninja ============

For more front-end development tutorials & to black-belt your coding skills, head over to – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg or http://thenetninja.co.uk

========== Social Links ==========

Twitter – @TheNetNinja – https://twitter.com/thenetninjauk

Original source


13 responses to “JavaScript Tutorial For Beginners #30 – Constructor Functions”

  1. However you are way faster than the ninja man but I have one question, suppose, if I have to call 20 cars, so iI need to write 20 lines of codes for only calling the constructor, is there any ways to go for loops, if yes, then how?

  2. Bro I am facing a problem. The problem is the starting sound of your videos is so annoying! and I don't want to skip any part of the video because it's distracting. Also, if any old guy want to start learning from your video then I don't know what's gonna happen…

  3. This is really well explained, once I tried to learn constructor functions from a book and couldn't get it. I've learn it easily from this tutorial, I've found out that those functions are quite simple. I guess I don't have talent for learning from books or you're just a good teacher!

Leave a Reply