javascript convert file to array

Solutions on MaxInterview for javascript convert file to array by the best coders in the world

showing results for - "javascript convert file to array"
Vanessa
13 Nov 2019
1var fs = require('fs');
2var text = fs.readFileSync("./mytext.txt", 'utf-8');
3var textByLine = text.split('\n')