You need to collect the files that were changed into two arrays. The first one should hold txt files, and the second one should hold js files. Here's the beginning of the code:
const fs = require('node:fs');
const txtFiles = [];
const jsFiles = [];
Arrange the remaining fragments of code in the correct order.