var fs = require('fs'); var text = fs.readFileSync("./mytext.txt", 'utf-8'); var textByLine = text.split(' ')