what is eval pls breif information send me
Answer / negi
The eval() function evaluates a string and executes it as if
it was script code.
In this example we use eval() on some strings and see what
it returns:
<script type="text/javascript">
eval("x=10;y=20;document.write(x*y)");
document.write("<br />");
document.write(eval("2+2"));
document.write("<br />");
var x=10;
document.write(eval(x+17));
document.write("<br />");
</script>
The output of the code above will be:
200
4
27
| Is This Answer Correct ? | 6 Yes | 0 No |
What are javascript functions?
Is it possible to break javascript code into several lines?
What does the attribute defer/async do when added to the script tag?
how many feet does a centipeed have?
What is createtextnode?
What does isNaN function do?
If we want to return the character from a specific index which method is used?
What are the requirements of web application using javascript?
How can a particular frame be targeted, from a hyperlink, in javascript?
Why global variables are bad javascript?
What is a boolean in javascript?
What does undefined value mean in javascript?