Defining the foreignAssets array in an application call

How do I define the foreignAssets array when creating an application call in javascript ?
Is there a reference for the definition of transactions?

This depends whether you are using the ABI or not.
With ABI-compliant method (which is what is strongly recommended now), then Atomic Transaction Composer - Algorand Developer Portal should manage everything by itself.

Otherwise, you need to specify these values as input of your make... function.
See algosdk for example and the field foreignAssets.
The ...FromObject versions are much more readable.