There's no infinite loop in your code, but there would be if you changed this:
this.end = val;
to this:
this.name = val;
(Question now updated to use this.name = val;
)
Because it would of course call the set
again, and again...
What you need is something like your .end
property to store the actual value, and then use a get
accessor to retrieve the value from .end
.
get: function() { return this.end },