Namespace it, so that it doesn't clash with third party scripts.
Don't forget though, that there are JS libraries for almost everything: http://www.jsdb.io/
So sometimes writing your own isn't the best way to go.
This topic is now closed. New replies are no longer allowed.