In ruby you can specify a range like:
(1...10).each do |num|
puts num
end
or
(1...15).each do |num|
puts num
end
is there a way to do something similar in JS without having to build a function that defines a range, such as:
function myRange() {
let x = [1,2,3];
return x;
}
Also the question on stack overflow "Does JavaScript have a method like “range()” to generate a range within the supplied bounds?" is the opposite of this question.
without <- keyword