How to call a function from another js file?

I am new to the workers, and I am wondering is there a way to call a function from another js file?

I tried to use ‘import’ and ‘require’ but no luck.

I would appreciate any help.

2 Likes