JSValue myVal = JSValue::fromString("Hello World"); // create a JSValue from string bool isCell = myVal.isCell(); // check if it is a Cell // isCell will return false since it is not a Cell
JSValue arr[3] = {JSValue::fromNumber(1), JSValue::fromNumber(2), JSValue::fromNumber(3)}; // create an array of JSValues JSValue cell = JSValue::fromArray(3, arr); // create a Cell from the array bool isCell = cell.isCell(); // check if it is a Cell // isCell will return true since it is a CellThe JSValue class is part of the Duktape package library, which is a lightweight JavaScript engine for embedding in C/C++ applications.