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 |
How to add html elements dynamically with JavaScript?
What is the most popular javascript library?
List different ways of empty an array in javascript?
name any two javascript functions which are used to convert nonnumeric values into numbers?
How we can get the value of an element using javascript?
In javascript chained select menus are available.first select menu is worked and others are disabled.when we select any one option then the next select menu will worked having option releated to selcted in first select menu.How it possible? what is the coading of this programme?
What is argument objects in javascript & how to get the type of arguments passed to a function?
Can I learn javascript without html?
Can you call a Java Applet using a JavaScript function?
What does _ mean in javascript?
Why is currying called currying?
How will you create new object in javascript?