//charCodeAt
的用法,把上面的诗句转换成asci码
把所有的数字都减 50 然后反编译回中文str
把 str 每个字转成 asci码
var chart ="两个黄鹂鸣翠柳,一行白鹭上青天"
var str = chart.split("")
console.log(str)
var std = []
for(var i=0;i<str.length;i++){
std.push(chart.charCodeAt(i))
console.log(chart.charCodeAt(i))
}
console.log(std)
for(var i=0;i<std.length;i++){
std[i]-=50
}
console.log(std)
var stdd =[]
for(var i=0;i<std.length;i++){
stdd.push(String.fromCharCode(std[i]))
}
console.log(stdd)