Send js variable to App variable

I tried to assign a js variable to a AC variable …works with hard value, bu not with js variable

browservalue = dmx.parse('lang.value'); // store 'fr'
alert(browservalue);  //display 'fr'
dmx.parse("sendlangtosession.setValue('hard value ok');");
dmx.parse("sendlangtosession.setValue(browservalue);");  //not ok

Error is :

SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
    at sessionManager.js:28
    at Array.reduce (<anonymous>)
    at n.getData (sessionManager.js:26)
    at n.set (sessionManager.js:12)
    at Object.data.<computed> (BaseComponent.js:475)
    at parser.js:714
    at t (parser.js:464)
    at parser.js:455
    at Object.dmx.parse (parser.js:388)
Community Page
Last updated: