DEV Community

Discussion on: JavaScript One-Liners That Make Me Excited

Collapse
 
jacobmgevans profile image
Jacob Evans

That was definitely a way to do it. However, I am pretty sure that only works with constraints on the range values, and the way I wanted to solve it was to be sure it could handle any range.

I could be wrong which in that case, I will certainly remember this way lol

Thread Thread
 
jacobmgevans profile image
Jacob Evans

Nope to me lol, you're just right and I am pretty sure that works for any size range not just that but the
Big O is significantly better ahahaha!