Is it possible to use Runtime environment variables in JS ?

We have a requirement where we need to define application URLs inside Javascript files. Instead of hard coding URLs,is it possible to use Runtime environment variables(Appzillon project> Static Data> Runtime environments) in Javascript files?
If yes kindly share the code snippet.
The Runtime Environment Variables under Static Data are used as part of the build process to replace end point URLs that are specified in Interfaces. Those variables are not available at runtime to the JS environment.

If the requirement is to change URLs runtime, then the recommended approach is to have a database table and store URLs in that table. An interface can be created in Appzillon on that table and the retrieved values can be used in JS. When any specific URL needs to be modified, then this approach allows you to update without any redeployment.