var USA_..." /> What Is Eval() In JavaScript? var USA_..." /> var USA_..." />
Answers

Question and Answer:

  Home  JavaScript

⟩ What is eval() in JavaScript?

The eval() method is incredibly powerful allowing us to execute snippets of code during execution in JavaScript.

<script type="text/javascript">

var USA_Texas_Austin = "521,289";

document.write("Population is "+eval("USA_"+"Texas_"+"Austin"));

</script>

This produces

Population is 521,289

 190 views

More Questions for you: