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 github.com #
 
PREVIOUS NEXT
Tagged: #loops #js
ADD COMMENT
Topic
Name
4+9 =