Iterate over an array of numbers and print each value
array = [1,2,3,4]
for number in array:
print(number)
array = [1,2,3,4]
array.each do |number|
puts number
end
var array = [1,2,3,4];
array.forEach(function(number) {
console.log(number)
});
It's a little confusing that you did the same thing twice in the Python one.