Return php value to .js JavaScript file

How is it possible to return php values to a .js file?
I can’t use echo.

Example php class:

return $_GET['q']['email'];

That should be returned to script.js

I realize I could work with echo. Unfortunately, this is not possible in a .js file.