元ネタ:愛が生まれた
派生ネタ:JavaScriptでも愛が生まれた
愛が生まれる理由:なんで愛が生まれるのか
class Shouter {
shout() {
return String.fromCharCode('生'.charCodeAt(0) & '死'.charCodeAt(0));
}
}
let shouter = new Shouter();
let button = document.createElement('button');
button.textContent = "Shout";
button.onclick = function () {
alert(shouter.shout());
}
document.body.appendChild(button);
こちらで実行できます typescriptlang.org