Created
October 5, 2022 07:14
-
-
Save gydoma/526df5ea471cec05b0d0dad749d61de0 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
lista3 = new Array(10, -10, 20, -20, 30, -30, 50, 222); | |
var hely = 0; | |
var keres = 20; | |
function kival(lista, keres, hely){ | |
for(let i=0;i<lista.length;i++){ | |
if(lista[i] == keres){ | |
hely = i | |
break | |
} | |
} | |
console.log("Keresett szám indexe: "+ hely); | |
} | |
kival(lista3, keres, hely); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment