I'm pretty new to JS—is this a common pattern? Allows for private / public?