###Pros:
- Correctly uses inheritance, for the most part.
- Good namespacing.
- JavaScript properties are sort of advanced. Nobody uses them though.
- Good formatting.
- Completed sections are all error-free on their returns.
###Cons:
this.name = n ? n : '';
is totally weird. If it's supposed to be a default value, it should ben = n || ''
, but''
is null anyway, so it would seem that it should actually saynull
and not''
, which would be an untitled vehicle (?).- Generally, JavaScript classes have parameterless constructors.
- Overkill with the property getters/setters that are incorrectly overridden, so it confuses the intepreter. E.g.:
Scopely.Instances.Motorcycle {name: "", name: "", _seats: 1, _wheels: 2, info: function…}
from Chrome. info()
could benefit from a knowledge ofunderscore
'somit
.- I wouldn't scope this either, but it would be nice.
- All the funny JavaScript properties and setters. Just not very idiosyncratic.