Stopping audio in JavaScript

Hey guys, I’ve got a question: is there a way I could make a function to disable a specific event? I’m currently using .bank files for my sound in a JavaScript game but I can’t stop seem to stop some sounds.
For example: I want to load a battle theme, but my normal background theme gets in the way (My battle music and background music are better apart: they don’t share the instruments and parameters).
Much thanks in advance for helping!

To stop an instance of an event, call Studio::EventInstance::stop on that instance.

Thank you! Now I can fix my game!

Now I’m getting a new error that I cannot seem to fix:
ReferenceError: Studio is not defined.

Code references to this line in the code: Studio.gEventInstance.stop(FMOD_STUDIO_STOP_IMMEDIATE)

This is my code on the matter:
export function stopSound(stopSoundVar) {
if (stopSoundVar === 1) {
} else if (stopSoundVar === 2) {

How do I declare this variable? I can’t just say:
var Studio

Do you or anyone else know the answer?
I thank you in advance

Why doesn’t this one work (this one is in the documentation):

And this one does?

example (it works now the way it should for me):

It’s a namespacing difference. The C# and JS enums (such as STUDIO_STOP_IMMEDIATE) are in the FMOD namespace, whereas the C and C++ enums are not.