How to call a function from one js file to another js file in electron?


I have two .js file. e.g : one.js and two.js. Now i have a function in one.js which i want to call from two.js. But i am unable to make it. How to do this? Can anyone please help me?
Here is the code:
function myStringPath(pathString)

              var newString =String(pathString);
              return newString;



var newPathString =myStringPath();


If both one.js and two.js are in render process you can call it without any issue
in your html file add both these scripts
script type=“text/javascript” src=“resources/scripts/one.js”>
script type=“text/javascript” src=“resources/scripts/two.js”>


thankx a lot :smiley: