1.字符转ASCII2.ASCII转字符 1.字符转ASCII使用字符串自带的.charCodeAt()方法 str = 'hello'a = str.charCodeAt()console.log(a) // 2.ASCII转字符使用 String类型内置的方法 String.fromCharCode() a = 10str = String.fromCharCode()console.log(str) //