I’m trying to write a simple text file reader by creating a function that takes in the file’s path and converts each line of text into a char array, but it’s not working.
Using Fetch and async function
const logFileText = async file => { const response = await fetch(file) const text = await response.text() console.log(text) } logFileText('file.txt')