function calculateWordCount(text) { const wordsArr = text.trim().split(" ") return wordsArr.filter(word => word !== "").length }