6 technically incorrect

This commit is contained in:
2025-02-05 12:20:00 +01:00
parent 9844efeaad
commit c0cf1f4177
10 changed files with 59 additions and 16 deletions

View File

@@ -18,4 +18,27 @@ const bilder = [
},
];
function holeStartBild(num){
return bilder[num];
}
function vor(current){
var next = current + 1;
if(next >= bilder.length){
next = 0;
}
return next;
}
function zurueck(current){
var prev = current - 1;
if(prev < 0){
prev = bilder.length - 1;
}
return prev;
}
// Hier den Code ergaenzen!
module.exports.bilder = bilder;
module.exports.holeStartBild = holeStartBild;
module.exports.vor = vor;
module.exports.zurueck = zurueck;