what's the purpose of eval function?
<p>i know this function gets a string of valid JavaScript expression or statements and evaluate the expression or execute the statements, but why we need to pass code to a function for execution instead of simply writing the code in the script?  </p>
