Tagged Questions
2
votes
3answers
181 views
Should I place functions that are only used in one other function, within that function?
Specifically, I'm writing in JavaScript.
Let's say my primary function is Function A. If Function A makes several calls to Function B, but Function B is not used anywhere else, then should I just ...
1
vote
1answer
223 views
Javascript heavy page/application - best practice for handling errors
Consider an application that contains a number of pages with a relatively large amount of javascript present, or a predominantly JS powered application. The script handles a number things, such as:
...
49
votes
2answers
4k views
Are there any OO-principles that are practically applicable for Javascript?
Javascript is a prototype-based object oriented language but can become class-based in a variety of ways, either by:
Writing the functions to be used as classes by yourself
Use a nifty class system ...