Create a controller and a empty theme page On Drupal 8, I'm looking for a way for creating an empty page (a page without any theme) that contains JavaScript code.
I created a controller via Drupal Console, and I searched for an example on the web, but I found only very simple examples. 

Is it possible to create an empty page accessible via a controller and add JavaScript code to this page?
Controllers must return a response (you will get an error if you don't). Your options are to return a render array, an HtmlResponse, a JsonResponse, or an AjaxResponse. 

Edit: Or as Kevin posted below, a Response.

By the sounds of it, you are wanting to return JSON, so JsonResponse is likely what you are looking for.