Api Key in Javascript

Hi,

Can you access the API value in Javascript?

Thanks

Yes, you can use Javascript to call the Ragic API. But you will need to be aware of the security limitations when running Javascript on user’s browser.

Sorry if I was not clear, I would like to know how to get the API key value into a JavaScript variable, something like:
var appAPIKey = …;

I am currently using a global constant to get the value into a variable such as:
var appAPIKey = c_AppAPIKey_Vale; /* AppAPIKey_Vale is set as global constant */

It would be much better to not have to set a global constant.

Thanks