reorganizing some more
This commit is contained in:
Executable
+33
@@ -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);
|
||||
Reference in New Issue
Block a user