xxxxxxxxxx
16
function setup() {
noCanvas();
select("#input").input(inputPassword);
}
function inputPassword() {
let encoded_password = "";
for (let i = 0; i < this.value().length; i++) {
//該当するASCIIコードを一つ増やして文字を追加していく
// a の場合は、ASCIIコードが一つ増えて bになる。
encoded_password += String.fromCharCode(this.value().charCodeAt(i) + 1);
}
select("#output").value(encoded_password);
}