JavaScript Eval

01.20.2015

The JavaScript ‘eval’ keyword takes a string as a parameter and runs it as if it were a line of code.

It can affect legibility, ability to debug, and performance.

It is best practice to not use this unless necessary.

Don’t use eval for mappings. Instead, use data structures  like arrays.

Don’t use eval to parse JSON. Instead, use JSON.parse().