Output of the following code snippet?

What will be the output of the following code snippet?

20

x+y

128

None of the above

<script type="text/javascript" language="javascript">
 
var x=12;
var y=8;
var res=eval("x+y");
document.write(res);
 
</script>

the corrext ans is 20

1 Like

correct Answer is 20

Correct Answer is 20