How to add functions needed for a plugin action

I have many functions needed in an action. How do I use them or how do I convert them?

This is just an example.

function(properties, context) {
  return {"value": foobar(properties.x, properties.y)};
}

function foobar(x, y) {
 return x+y;
}
1 Like

Please explain further.

Assuming you’re retuning a value from a ssa - you’d use

return { myReturnValue: returnValue }
1 Like

Hello,
I suggest you use free plugins’ source code to learn how to make plugins.

All kinds of challenges and how to solve them have been prepared by dear plugin builders.

Apologies for missing your response. :sweat:

It was not my intention to be impolite.
Please don’t misinterpret my actions.

1 Like

Thank you for the suggestion. ::

It turns out that functions can exist inside a function.

function(properties, context) {
   function foobar(x, y) {
      return x+y;
   }
   return {"value": foobar(properties.x, properties.y)};
}
1 Like