SyntaxError: Unexpected token ILLEGAL

1、错误描述

> buf=new Buffer("我爱你,簌簌簌簌簌');
SyntaxError: Unexpected token ILLEGAL
    at Object.exports.createScript (vm.js:24:10)
    at REPLServer.defaultEval (repl.js:235:25)
    at bound (domain.js:287:14)
    at REPLServer.runBound [as eval] (domain.js:300:12)
    at REPLServer.<anonymous> (repl.js:431:12)
    at emitOne (events.js:82:20)
    at REPLServer.emit (events.js:169:7)
    at REPLServer.Interface._onLine (readline.js:211:10)
    at REPLServer.Interface._line (readline.js:550:8)
    at REPLServer.Interface._ttyWrite (readline.js:827:14)
>

2、错误原因

单双引号混用,导致出现错误


3、解决办法

> buf=new Buffer('我爱你,簌簌簌簌簌');
<Buffer e6 88 91 e7 88 b1 e4 bd a0 ef bc 8c e7 b0 8c e7 b0 8c e7 b0 8c e7 b0 8c
e7 b0 8c>
>


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值