代码
var t=['1','2','3']; var buf=Buffer.concat(t); console.log(buf); 错误提示:
buffer.js:239 buf.copy(buffer, pos); ^
TypeError: buf.copy is not a function at Function.Buffer.concat (buffer.js:239:9) at Object. (c:\Users\xa87\WebstormProjects\jlc\t3.js:5:16) at Module._compile (module.js:397:26) at Object.Module._extensions..js (module.js:404:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Function.Module.runMain (module.js:429:10) at startup (node.js:139:18) at node.js:999:3
Process finished with exit code 1