The ColorPoint class, extends Point.
Extends Point
let cp = new ColorPoint(25, 8, 'green');
console.log(cp instanceof ColorPoint); // true
console.log(cp instanceof Point); // true
Class method, overwrites toString of Point.
let cp = new ColorPoint(25, 8, 'green');
cp.toString(); // '(25, 8) in green'
A Point class, declared using the declaration-form.
let p = new ColorPoint(25, 8, 'green');
console.log(p instanceof Point); // true
A class method.
let p = new ColorPoint(25, 8);
p.toString(); // '(25, 8)'