Go Pro Sign Up Login
0 days 0 hrs 0 min 0 sec

Summer Sale

50% off Level Up Pro until you unsubscribe.
Get access to ALL 128 courses on Level Up Tutorials

This is your last chance to get Level Up Pro for $145/year.

or Learn More
Moon Moon

Buy Now and unlock this series

$

49

.99

$

39

.99

yours forever

Become a Pro and unlock everything

$

24

.99

per month

Keyboard Events

In this video, we will take a look at keyboard events and how we can use the keyboard to navigate our tabs panel.

Downloads

Become a pro to download code and videos

Comments

Bill

8 months ago

Slightly simpler, to write at least:

newIndex = Math.max(currentIndex - 1, 0);

Maybe the if statement following the set is easier for subsequent readers?

Want to join the conversation?

Become a Pro member today!