0

I have used eval() function in my code but Sonar is suggesting me to not to use eval(). What are the consequences and is there any alternative?

guest271314
  • 1
  • 15
  • 104
  • 177
H.Ostwal
  • 333
  • 1
  • 5
  • 11
  • this should answer your question: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#Do_not_ever_use_eval! as well as this https://stackoverflow.com/questions/86513/why-is-using-the-javascript-eval-function-a-bad-idea – Nick Parsons Feb 22 '19 at 05:55
  • duplicate of [Why is using the JavaScript eval function a bad idea?](https://stackoverflow.com/questions/86513/why-is-using-the-javascript-eval-function-a-bad-idea) – Pushkar Adhikari Feb 22 '19 at 05:56
  • Use of `eval()` depends on what _you_ are trying to achieve. – guest271314 Feb 22 '19 at 05:59

0 Answers0