The connection between JavaScript and Shiny is another reason to recommend RStudio as an IDE because it performs beautiful syntax highlighting on JavaScript straight out of the box (although, clearly, other text editors and IDEs may do this or be easily configured to do so).
Before we proceed, it's worth reviewing the difference between server and client-side code and what they're used for. JavaScript gained popularity as a client-side language, which ran on web browsers and added interactivity to websites that would otherwise be static HTML and CSS files, which were downloaded from servers.
It has found increasing use on the server side (for example, with Node.js), but we are going to use it on the client side and so will not consider this any further. So, in this case, JavaScript is running on the client side. The server side in this case, of...