# Creating and Destroying JSVMs Using JSVM-API
## When to Use
Use **createJsCore** to create a JavaScript virtual machine (JSVM), which is 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
If you are just starting out with JSVM-API, see [JSVM-API Development Process](use-jsvm-process.md). The following demonstrates only the C++ code involved in proxy-related APIs.
Create multiple JS runtime environments and run JS code.
```cpp
#include