# Creating and Destroying JSVMs Using JSVM-API
## When to Use
Use **createJsCore** to create a JavaScript virtual machine (JSVM), which a runtime environment for executing JS code. The **createJsCore** returns a core ID, which uniquely identifies a VM.
Use **evaluateJS** to run JS code in the VM of the specified core ID and define a promise in the JS code and run the function asynchronously.
Use **releaseJsCore** to release a JSVM.
## Example
Create multiple JS runtime environments and run JS code.
```cpp
#include