What is being done in the following JavaScript code?
A. Event and EventListener is created according to the if-else
B. The values are updated
C. The value is called
D. The values are stored
Code:
<script>
if (window.attachEvent)
window.attachEvent('onload', fetch);
else
window.addEventListener('load', fetch, false);
</script>
B. The values are updated
C. The value is called
D. The values are stored