JavaScript Prototype Tip
So, prototype, what is it again?</br>
I've fiddeled around abit and created an easy self explanatory code segment to explain the nutorious prototype object:</br>
Check it out in http://jsbin.com/abemax/7/
If we were to add extra functions to the Name obejct,</br> we would have to use the prototype object inorder to do that. Otherwise we would get and error, because we can't attach a new function to an already "encapsulated" object (aka Name).
Written by Agam
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Js
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#