Created
October 5, 2022 07:13
-
-
Save gydoma/140c12e82edd87328d6be8bae598a9b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lista4 = new Array(10, -10, 20, -20, 30, -30, 50, 100); | |
lista4b = new Array(); | |
var kival = 15 | |
function kivalogatas(lista, kival, lista4b){ | |
let b = 0 | |
for(let i = 0; i < lista.length; i++){ | |
if (lista[i] < kival){ | |
lista4b[b] = lista[i]; | |
b++; | |
} | |
} | |
console.log(lista) | |
console.log(lista4b) | |
}; | |
kivalogatas(lista4, kival, lista4b); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment