Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

using for loops js

var scores = [21, 35, 54, 46];
        var arrayLength = scores.length;
        var msg = '';
        var i;

        for (i = 0; i < arrayLength; i++) {
            roundNumber = (i + 1);
            msg += 'Round ' + roundNumber + ': ';
            msg += scores[i] + '<br />';
        }
Source by raw.githubusercontent.com #
 
PREVIOUS NEXT
Tagged: #loops #js
ADD COMMENT
Topic
Name
7+8 =