var array = [1,2,3]
for(var i = 0; i < array. length ; i++){
console. log(array[i])
}
//This is how you print the elements of the array if it is useful!
//-Andrew Ma
print whole array on one line without brackets javascript
var arr = [1,2,4,5]
console.log(...arr) //Spreading operator in JS
var array = [1,2,3]
for(var i = 0; i < array.length ; i++){
console.log(array[i])
}
var array[]
print(array[])
const arr = [1, 2, 3, 4, 5];
console.table(arr);
var array = [1,2,3]
for(var i = 0; i < array. length ; i++){
console. log(array[i])
}
// Array of primitives:
int[] intArray = new int[] {1, 2, 3, 4, 5};
//output: [1, 2, 3, 4, 5]
// Array of object references:
String[] strArray = new String[] {"John", "Mary", "Bob"};
//output: [John, Mary, Bob]