When to use the prototype of a Function

/ Published in: JavaScript
Save to your folder(s)

Assign methods to a Function prototype when you intend to create instances of the type of object. Use object literals when you just need a container for functions.

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.