As its name indicates, Javascript eval function is used to execute javascript source code.
Note: Use of eval method is not advised for the following reasons:
Syntax