Quantcast
Channel: JavascriptKata - Latest Comments
Viewing all articles
Browse latest Browse all 47

Re: Ask Dan : Procedural VS object-oriented in javascript

$
0
0

This is not a good example of why oo is better than procedural.
The procedural example above is not how I would write procedural.
Bad code is caused by bad code organisation, not whether its oo or procedural.
I would organise my procedural code in its own block, wrapped in it's own namespace so you could access it like:
myModule.doSomething()
myModule.model.globalVar = ''
etc


Viewing all articles
Browse latest Browse all 47

Trending Articles