The browsers provide us with 2 key APIs which allow us to add Responsive Javascript to our site, they are the window.matchMedia API and the window.onresize API.