implemented the 1st js code exercise

main
Oliver Stolle 2026-06-01 21:35:39 +00:00
parent 9173b0e33a
commit b54903697b
1 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,10 @@
const zahlen = [38, 0, 226, 384, 111, 500383];
for (let i = 0; i < zahlen.length; i++) {
zahlen[i] == 0 ? console.log("Null") :
zahlen[i]%2 == 0 ? console.log("Gerade Zahl") :
zahlen[i]%2 != 0 ? console.log("Ungerade Zahl") :
null;
}