Code:-
- <html>
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- </head>
- <body>
- <h1>eval</h1>
- <button onclick="getval();">Access eval</button>
- <script>
- /* Evaluate/Execute JavaScript code/expressions
- Convert String to JavaScript expression, variable, statement, or sequence of statements. */
- function getval()
- {
- var test = "a";
- var a = "Anjali";
- alert("test : " + test);
- alert("eval(test) : " + eval(test));
- }
- </script>
- </body>
- </html>
Eval ():- JavaScript
Reviewed by Network security
on
November 13, 2019
Rating:
No comments: