Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include "mujs/mujs.h"
- int main() {
- js_State *js;
- js = js_newstate(NULL, NULL, JS_STRICT);
- js_loadstring(js,"myscript", "var arr=[1,2,3];");
- js_pushundefined(js);
- js_pcall(js, 0);
- js_getglobal(js, "arr");
- // js_delindex(js, -1, 2);
- js_getindex(js, -1, 2);
- printf("Value: %s\n", js_tostring(js, 2));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement