Andrew Kelley 7/17/2013

Private Methods in JavaScript

Read Original

This technical article demonstrates a pattern for creating genuinely private methods in JavaScript, moving beyond the conventional underscore convention. It provides code examples comparing traditional pseudo-private methods with a scoped function approach, includes a performance benchmark showing negligible difference, and discusses browser scoping considerations.

Private Methods in JavaScript

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week