I have gone through multiple post like Embedded js in a batch file which suggest the possibility of combining batch file and javascript. My question here is-whether it is possible to use the method of a .js file in .bat file? For example-Define a js file with some methods as below -
test.js
add:function(a, b){ return a+b;}
test.bat
add(1, 2); ::Or something like add 1 2
Output
C:\>test
3