Writing a value to a .js file within the resource folder

A few more methods of working with data in your resource library, but I think Max’s solution is what you want: