What Is Being Done In The Following Javascript Codep Pre #920
What is being done in the following JavaScript code?</p> <pre><code class="language-javascript"> <script> if (window.attachEvent) window.attachEvent('onload', fetch); else window.addEventListener('load', fetch, false); </script> </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs106 Javascript. It can also be found in gs gs106 Invocation and Performance Navigation - JavaScript Lazy Loading - Quiz No.2.
What is being done in the following JavaScript code?
<script> if (window.attachEvent) window.attachEvent('onload', fetch); else window.addEventListener('load', fetch, false); </script>
Event and EventListener is created according to the if-else
The values are updated
The value is called
The values are stored
Similar question(s) are as followings:
Online Quizzes of gs106 Javascript
Graphics and Rendering in JavaScript - Scripted Media - Quiz No.1
gs gs106 Javascript
Online Quizzes