How can I print out numbers for multiples of 3 that divide without a remainder numbers?
I am attempting to get 3
, 6
, and 9
in array but only 1
prints out, my syntax could be wrong.
var numbers = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];
for (var i = 0; i % 3 === 0; i++) {
console.log (numbers[i]);
}
Please login or Register to submit your answer