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 |
Explain unescape() and escape() in javascript?
What is javascript and how it works?
What is the difference between attributes and property?
What can I build with javascript?
How will you explain closures in javascript? When are they used?
Which built-in method returns the characters in a string beginning at the specified location?
Can webassembly replace javascript?
How compare function works javascript?
What would be the result of 3+2+”7″?
Which is the best website to learn javascript?
How many types of functions are there in javascript?
How use javascript html?