read file from browser javascript code example
Example: read file javascript
// As with JSON, use the Fetch API & ES6
fetch('something.txt')
.then(response => response.text())
.then(data => {
// Do something with your data
console.log(data);
});