Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97762

Javascript Return More Than One Range From Array.from() Method

$
0
0

Very new to Javascript, as I'm primarily using it to execute commands in Selenium IDE. I've been using the range function provided by Mozilla's documentation for the array.from() method. This is how I put it together in Selenium:

const range = (start,stop,step) =>
  Array.from(
    { length: (stop - start) / step + 1},
    (_, i) => start + (i * step)
  );
  return(range(179,199,1))

Is there a way to return more than one range? Why doesn't this work? (In Selenium IDE, it completely skips over this command.) Is it because it's 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))

Viewing all articles
Browse latest Browse all 97762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>