How to access data / variables with JavaScript?

I have a working HTML5 package and want to access game data / variables via the browser/javascript.

Say I have a variable called currentSpeed in my Blueprint and the HTML5 package is running in the browser. How can I access this variable via JavaScript to be able to use it elsewhere on my webpage?

Is this even possible?

It is definitely possible. This talks about connecting C++ and Javascript.

Thanks a lot for the quick reply. I will try it out tomorrow.

Speaking of ccall() and cwrap() from your link, where would I have to put the emscripten command to have it all built/packaged together with my HTML5 game? Does this need to be set in my Target.cs or Build.cs?

look up HTML5JS module - HTML5JavascriptFx.h/cpp/.js files.

Another example is the resize callback in Game.html.template