Answers for "js arrayy"

140

javascript array

//create an array like so:
var colors = ["red","blue","green"];

//you can loop through an array like this:
for (var i = 0; i < colors.length; i++) {
    console.log(colors[i]);
}
Posted by: Guest on July-01-2019
-1

array

double prod(double #1,int #2){    double result= 1;    for(int i = 0;i<length;i++){        result = result * array[i];    }    return result;}
Posted by: Guest on June-27-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language