* declaring JSON (or similar format, but why reinvent the wheel) variables
* rendering the values of these variables
* interacting with the variables with controls (inputs, check boxes, selects, etc)
* conditional rendering based on those variables
* iteration over them
* submitting a form as a JSON object
* saving a JSON response from the server into a variable
* re-rendering the effects of a variable change without a full page reload
I think a major reason for why we ended up here[2] is because browsers did not add these features to HTML and thus devs resorted to AJAX and small JS snippets at first and then kept expanding the use of JS.
[1] as a Java dev who used to do front-end before the ascendance of client side SPA frameworks I'm thinking of JSP, JSF, Thymeleaf, etc. Maybe the client side stuff used nowadays is similar, I'm just not familiar with it.
[2] being forced to run a turing-complete programming language just to display a fully static document, leaving one exposed to security risks (yes, the browser guys are doing a much better job sandboxing than Flash, Java Applets, etc) and tracking.