Source @ github

eval

eval

Description

eval(string code)

Executes code stored in a string variable. Passing in code that is created by, or can be modified by a third pary is considered a security risk.

Parameters

Name Description Type Default Optional
code string No

Examples

Example #1 – eval example
var code = 'console.log(document);' eval(code); // Will log out the document object.

External references