As a newcomer to Javascript, I have been mainly using it to run commands in Selenium IDE. One of the functions I've been relying on is the range function from Mozilla's documentation for the array.from() method. This is how I implemented it in Selenium:
const range = (start, stop, step) =>
Array.from(
{ length: (stop - start) / step + 1 },
(_, i) => start + (i * step)
);
return(range(179, 199, 1))
I am wondering if there is a way to output multiple ranges instead of just one. Also, why does this script not work as intended? When executed in Selenium IDE, it seems to skip over this command. Could it be due to it being a multi-dimensional array?
const range = (start, stop, step) =>
Array.from(
{ length: (stop - start) / step + 1 },
(_, i) => start + (i * step)
);
return (range(179, 199, 1), range(201, 210, 1))