let output = document.getElementById("output"); let input; let linesArr; let parsedArr = []; let cmdArr = []; function readFile(input) { let file = input.files[0]; let fileReader = new FileReader(); fileReader.readAsText(file); fileReader.onload = function() { input = fileReader.result; linesArr = input.split("\n"); }; fileReader.onerror = function() { alert(fileReader.error); }; } let start = document.getElementById("start"); start.addEventListener("mouseover", () => { start.innerHTML = "pwease pwess mee hawwd mastaaa! ~^o^~" }); start.addEventListener("mouseout", () => { start.innerHTML = "sowwy mastaa! Ow0;" }); start.addEventListener("click", () => { parseArr(); parseCmd(); for(let i=0; i