let jquery write javascript code to another js file

let jquery write javascript code to another js file

Is there a way to let jquery write code in an other file.
so create the code in jsfile1 and than move that code to jsfile2.