loading...

re: How to create range in Javascript VIEW POST

FULL DISCUSSION
 
/// declaration
(s,e)=>[...Array(e-s+1)].map((_,i)=>s+i)
/// use
((s,e)=>[...Array(e-s+1)].map((_,i)=>s+i))(5,9)
/// output
[5, 6, 7, 8, 9]

😉🤩✨✨✨

Code of Conduct Report abuse