JS connected to Frontend

JS updates DS according to buttons.