Courses:
Result:
Sample codeasync function getRemoteData(param){ let array= [] let rawData2 = await fetch("https://maeyler.github.io/JS/data/Courses.txt"); let text2 = await rawData2.text(); let newArray = text2.split("\n"); for (let line2 of newArray) { let veri2 = line2.split("\t"); let course = new Course(veri2[0], veri2[1], veri2[2], veri2.slice(3)); array.push(course); } for (let kurs of array ){ if(kurs.kod==param){ result.innerText = kurs } } }