What Will Be The Work Of The Bgetavgb In The Following #1064
What will be the work of the <b>getAvg</b> in the following JavaScript function?</p> <pre><code class="language-javascript"> <script> function getAvg(){ var avg = 0; for(var x = 0; x < 200; x++){ avg += x; } return(avg/200); } </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs106 Javascript. It can also be found in gs gs106 Caching, Debugging and Animation - Comparison of Core JavaScript versus Frameworks - Quiz No.2.
What will be the work of the getAvg in the following JavaScript function?
<script> function getAvg(){ var avg = 0; for(var x = 0; x < 200; x++){ avg += x; } return(avg/200); }
Multiples values from 0 to 200
Adds values from 0 to 200
Simply traverses with no operation
Find the average of 199 numbers
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