I have a JQuery script that I'm working on and in part of it, I am comparing a value to make sure it is within a specific integer range.
This is what my first attempt looks like:
if (levelCounter < 0) { levelCounter = 0; }
if (levelCounter > maxLevels) { levelCounter = maxLevels;}
I'm hoping there's a shorter more efficient way to do this - I can't think of it off the top of my head.

