How to readily run a function inside the parameter to get its string output which is the same as $( … ) in bash ? e.g.
navigator.registerProtocolHandler("sms","https://example.com/foobar/?&to=%s.replace(/^\w+:(.+)$/,"$1")")
VM298:1 Uncaught SyntaxError: missing ) after argument list
How is the correct writing ?