Appearance
VM Code SDK v2 / setData
Function: setData()
setData(
key,val):void
Stores data in the session store under the specified key.
Parameters
• key: any
The key under which to store the value.
• val: any
The value to store.
Returns
void
void
Remarks
This function allows you to store key-value pairs in the session's data store.
Example
typescript
const bar = 'Hello World';
setData('foo', bar);