Browser.ExecJS does execute JavaScript.
If your global variable is within Construct Events system, you need to use Construct's action (ie: Set global variable value to Multiplayer.message).
It makes little sense using actual JavaScript in this instance.
You can get an actual keycode or string from a keycode using the Keyboard plugin.
When you send a string message, providing it a numerical value will turn it automatically in a string, so no issue on sending.
On the receiving end, assigning a numerical value from a string can require to use the "float(Multiplayer.message)" system expression in order to "convert" it into a numerical value that could be used to assign it to a numeric global variable for example.
So send a simpler message (loopindex is enough in this case as apparently you are doing some kind of loop).
And when you want to assign it on reception, use the actual condition "On peer message" and in this one, assign the global variable "moltiplayertext" to float(Multiplayer.message).
Get rid of all the useless JavaScript/Browser.ExecJS that makes things more complex than they need to be.