Implement Point
so that:
new Point( new Point(10, 20) + new Point(30, 50) ).toString() === '{40,70}'
Must be generic and be able to handle x
and y
values from 0..999 (integers only)
Minor hint: you'll need to implement valueOf
and toString
methods.
mine: https://gist.github.com/3138260
it was fun :)