You can't pass a JS variable into a JS file (that doesn't quite make sense). What you can do is to create a JS variable, and make it accessible to the script you are including.
So you'd include your JS file as you are already doing:
{% includeJsFile 'path/to/file' %}
And then you would create your variable, and in JavaScript pass that variable back into the script which you called.
{% includejs %}
var myData = 'whatever your data needs to be';
functionFromIncludedScript(myData);
{% endincludejs %}
The snag you're going to run into here is, the order matters. When you use Craft's include
methods, they will always include any files before any raw scripts. So using this method, your variable will be defined after the file has already been included.
It's important to note, the "files before raw scripts" will happen regardless of which order you defined them in Twig.
Similarly, be aware that your file include and raw script include will both happen at the bottom of the page, just before the closing </body>
tag.
Now I'm going to make an assumption... You're about to say "But I need my variable declared before the file is included!"
Fair enough, and the solution is pretty simple. Just declare your JS variable in the middle of the page, while you're rendering the main Twig code:
<script>
var myData = 'whatever your data needs to be';
</script>
So your variable declaration gets rendered along with the rest of your HTML, and your includeJsFile
still happens at the bottom of the page. By the time that file is included, your JS variable is sitting around waiting for it.