« first day (4935 days earlier)   
05:00 - 06:0011:00 - 14:00

5:59 AM
@matt There is a problem with this specific object you show - each of the methods will exist for each of the instances created. This can create memory bloat if you instantiate a lot of them. A class (and more properly: prototype inheritance) will reduce the overhead since all instances will share a single copy of the methods.
With that said, you are correct that the approach of creating objects in that fashion is viable. You just have to be aware of the memory problems. A solution is a trivial as "don't have methods" - you can just expose functions that consume the objects, thus you're only constructing data objects.
 
05:00 - 06:0011:00 - 14:00

« first day (4935 days earlier)