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 |
Can you run javascript in notepad?
What are the boolean operators supported by javascript? And operator: &&
How can you read properties of an Object in JavaScript?
What is the difference between innerhtml & innertext?
Which javascript is best?
<script type="text/javascript"> function dispValue(e) { v = function (s) { return e.name + ': ' + s } if (e.type == "") return v(e.checked ? "" : ""); else return v(e.value); }
What would be the result of 3+2+”7″?
Why do we need javascript?
What is a null variable in javascript?
What do “1”+2+4 evaluate to?
How do I view javascript in chrome?
Will javascript be replaced?