Counting words from stored .md files
How to modify this code, so it doesn't use forEach?

One way to achieve this is using Array.prototype.reduce():
const totalWordCount = fileTexts.reduce((big: sum, fileText: string) =&gt; {
    return sum + nlp(fileText).wordCount()
}, 0)

Notice that totalWordCount is assigned once so const can be used which helps avoid accidental re-assignment and other bugs.
If fileTexts is only used to calculate totalWordCount then the two loops could be combined into a single loop (e.g. with reduce()).
To learn more about functional techniques try these functional exercises.