what you just did is give your functions a "namespace". your functions are now a "collection of related tasks"
namespacing means that is your functions don't "live" in the global scope anymore (and thus avoid polluting/overwriting it with other functions). so all your functions can be addressed from the "namespace" and not worry if another function has the same name as it (like another create()
).
like say in your app you have a database and a view. both can do a "create" but having 2 create()
functions is not possible. creating weird names like createDatabase()
and createView()
is just not organized. thus you create namespaces so they can be called database.create()
and view.create()
- makes more sense.