Various examples of js design patterns