in the ScriptCode property you need something like this:
function (e, inputParameter) {
return “something”;
}
when the function is called inputParameter will bind to the InputParameter property of the “Inject js script” activity.
See more here: How to work with Inject JS - #2 by aksh1yadav
Adrian.