Forum Discussion

MayuriPatel's avatar
MayuriPatel
New Contributor
13 years ago

Where should we put the functions in any groovy script ?In t

Hi,

Where should we put the functions in any groovy script ?
In the beginning of the script or in the last?

Thanks,
Neelam

1 Reply

  • Hi Neelam,

    You can have them any way you like; it doesn't matter if they're before other code or after. If you have a lot of functions however, it is usually recommended to put your functions in a library instead of having them all in-line.

    I hope this answers your question.

    Regards,

    Arian
    SmartBear Sweden