Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript read file lines into array vanilla

const fileList = event.target.files;
let fileContent = "";

const fr = new FileReader();
fr.onload = () => {
  fileContent = fr.result;
  console.log('Commands', fileContent);
}

fr.readAsText(fileList[0]);
 
PREVIOUS NEXT
Tagged: #javascript #read #file #lines #array #vanilla
ADD COMMENT
Topic
Name
1+1 =