■
function shiftStr(str, n) { var repStr = ""; for(var i = 0; i < str.length; i++) repStr += String.fromCharCode(str.charAt(i).charCodeAt(0) + n); return repStr; }
charCodeAtとかfromCharCodeがあるって今知った。
function shiftStr(str, n) { var repStr = ""; for(var i = 0; i < str.length; i++) repStr += String.fromCharCode(str.charAt(i).charCodeAt(0) + n); return repStr; }
charCodeAtとかfromCharCodeがあるって今知った。