© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Dinys Monvoisin
Software developer, JavaScript Euthusiasts, Inspiring Blogger
I prefer more solution 1, function which is more straight forward and avoid dealing with stuff like prototype chain which not everybody is comfortable.
Favourite Jome
Software Engineer @bug0
If that's your preference, it fine.
But each user will have the same method returned each time the user function is called.
user
Well in this case where there's one method it's okay I guess but there're multiple methods, it will a waste of storage.
Thanks for sharing your thoughts