Variables in Harlowe 3.1

I am making my first Twine game as a school project, so I have no experience with this … is there a way to use variables from Harlowe in Javascript or vice versa?

note: Ideally this Twine related question should be within the Authoring > Twine category, assigning it a Harlowe related tag would help any person answering it know the name and version of the story format used.

Harlowe has been deliberately design by its developer to restrict an Author’s ability to use JavaScript to access the internals of its (JavaScript based) engine, and because those internals are undocumented (no JavaScript API) an Author would need to read the story format’s source code to learn how the engine works internally.

There are a number of different methods you can use to access to the engine’s internals, most of them involve using a Scope Escalation hack of one form or another.

One example of such a hack is Furkle Industries’ “Harlowe Textbox Input” extension which uses a set of custom functions (commented on here) to gain access to the engine’s (story variable) State system.

I’ll just join the Cult of Greyelf.
Thank you, you are the best.