How to find JavaScript variable by its name

<script>
var a ="test";
alert(a);
alert(window["a"]);
alert(eval("a"));
</script>

Leave a Comment