eval javascript, check for syntax error

后端 未结 6 497
失恋的感觉
失恋的感觉 2020-12-08 09:50

I wanted to know if it is possible to find through javascript if a call to eval() has a syntax error or undefined variable, etc... so lets say I use eval for some arbitrary

6条回答
  •  既然无缘
    2020-12-08 10:32

    You can use JsLint which contains a javascript parser written in javascript. It will give you lots of information about your code, it can be configured to be more relaxed or not, etc...

提交回复
热议问题