Please use the Question Tags to state the name and full version number of the Story Format you are using, as answers can vary based on this information. I will assume that you are using Harlowe v2.1.0
Each story project you create is assigned a unique identifier (known as a IFID), this identifier is embedded within each Harlowe 2.x based story HTML file you create, and it is used by the (save-game:) macro when it persists a copy of the game's current History in the web-browser's Local Storage area.
This is why the (load-game:) macro won't load the saves created in a different story, and why multiple story HTML files can use the same Slot Name when saving.
You can use JavaScript to access & persist data stored within a web-browser's Local Storage area, if that area exist within the web-browser being used by the end-user, and the following two questions contain answers showing two different ways to do that:
Making achievements in Harlowe
Global Stats - How do you create global stats that are shared between games?
However Harlowe (both 1.x & 2.x) has been deliberately designed to restrict what access an Author has to the story format's JavaScript based engine, and there is no documented API for using JavaScript to interact with the story variables stored within the engine's History system.
There are a number of ways you can get around this limitation, two of them being:
1. using JavaScript to hack Harlowe's engine.
2. using TwineScript to assign the value returned from a JavaScript expression to a story variable.
The following example shows how to do the second method with the Global Stats related solution.
(set: _totalKills to GlobalStats.totalKills)
DEBUG: totalKills: _totalKills