The use is probably identical to what you can do in C2. You use the browser object to be able to run js code. However to use code in a file you need to load it first.
Here is a c2 example that uses jquery to load the file:
nima-web-based-2d-bone-and-mesh-animation-app_p1110744?#p1110744
This one does it without jquery which is important since c3 no longer has jquery included.
https://www.dropbox.com/s/7ueb6v9l7395o ... .capx?dl=0
It still won't work if imported to c3. The c2_callFunction needs to be changed to c3_callFunction.
It has the benefit of being a way to try javascript code with your project without making a plugin. However it's much less readable and more error prone.