All Questions
1 question
0
votes
0
answers
1k
views
validating arguments in javascript constructors
In many cases, it is useful to have a constructor or factory method that validates arguments before instantiating an object, returning a new object if the arguments are valid and null otherwise.
But ...