#How to read txt file in javascript

5 messages · Page 1 of 1 (latest)

dawn lynx
#

anyone know how to read a txt file in javascript?

#

I tried using

#

const fs = require('fs')

#

but I get the error

#

Uncaught ReferenceError: require is not defined