Between multiple files

What is the best way to use a single world in multiple Javascript files? It is probably either passing a pointer to the world into a function, or defining it in a file that contains global variables and importing the file.

Original thread: https://box2d.org/forum/viewtopic.php?t=7760