>>241
既存の型にもメソッド追加できるよ
例えばJavaScriptならこんな感じ

// 文字列にhello()を追加
String.prototype.hello = function() {
console.log(`Hello ${this}!`);
};

// 数値にhello()を追加
Number.prototype.hello = function() {
console.log(`Hello ${this}!`);
};

"abc".hello();
// 123.hello(); // 文法エラー
let num = 123;
num.hello();