Using CSS breakpoints into JavaScript

A simple and efficient way to use CSS breakpoints in the JS code.

What breakpoints are used right now? (this is managed via javascript)

MOBILE
NOT MOBILE
TABLET
TABLET PORTRAIT
TABLET LANDSCAPE
DESKTOP
NOT DESKTOP

Following button will trigger something different on mobile: