Expanding on the Number class:
interface Number {
evolution(now: number, before: number): string;
}
Number.prototype.magnitude = function(d=1, suffix="") {
//…
}
I enjoy incorporating default parameters.
However, encountering an issue when leaving out explicit parameters:
label = "÷ " + show.magnitude();
An error occurred stating "The supplied parameters do not match signature"