| | |
| | | }); |
| | | |
| | | function main() { |
| | | let lectures = [ |
| | | const lectures = [ |
| | | // ergänzen Sie die Vorlesungen hier. Die Struktur des Elementes finden Sie im Skript |
| | | ]; |
| | | let lecturesInformation = [] |
| | | for(let lecture of lectures ) { |
| | | let homework = calculateHomeworkTime(lecture.ects, lecture.sws/2); |
| | | let newLecture = Object.assign({},lecture); |
| | | const lecturesInformation = [] |
| | | for(const lecture of lectures ) { |
| | | const homework = calculateHomeworkTime(lecture.ects, lecture.sws/2); |
| | | const newLecture = Object.assign({},lecture); |
| | | newLecture.homework = homework; |
| | | lecturesInformation.push(newLecture); |
| | | } |
| | |
| | | let table = `<table><tr> |
| | | <th class="name">Vorlesung</th><th class="effort">Aufwand pro Woche in Stunden</th> |
| | | </tr>\n`; |
| | | for(let l of lecturesInformation) { |
| | | for(const l of lecturesInformation) { |
| | | table += `<tr><td class="name">${l.name}</td> <td class="effort">${l.homework}</td></tr>\n` |
| | | } |
| | | table += "</table>"; |