tir*_*hen 1 javascript character utf-8 utf node.js
我正在尝试使用变量和\ u来创建Node.js的UTF字符.
var code = '0045';
console.log('\u0045', '\u' + code);
但输出变成了
E u0045
我该怎么做
E E
如何创建角色并将其存储在变量中?
用途String.fromCharCode:
String.fromCharCode(0x0045)
String.fromCharCode(parseInt('0045', 16))