Functional or Object Oriented JavaScript?