reorganizing some more

This commit is contained in:
brightboost
2021-12-01 14:39:18 +01:00
parent f8bde27fc6
commit 9116b55477
37 changed files with 998 additions and 679 deletions
+33
View File
@@ -0,0 +1,33 @@
let i = 0;
while (i < 10) {
console.log(i);
i++;
}
let someArray = ["Mike", "Antal", "Marc", "Emir", "Louiza", "Jacky"];
let notFound = true;
while (notFound && someArray.length > 0) {
if (someArray[0] === "Louiza") {
console.log("Found her!");
notFound = false;
} else {
someArray.shift();
}
}
console.log(someArray);
let nr1 = 0;
let nr2 = 1;
let temp;
fibonacciArray = [];
while (fibonacciArray.length < 25) {
fibonacciArray.push(nr1);
temp = nr1 + nr2;
nr1 = nr2;
nr2 = temp;
}
console.log(fibonacciArray);