Closest value to some value check possible?

@Levio
Instance vars were just example not what i want to do
I do not need it now i just see one day i will need it for something maybe even for something that does not involve objects

@insein
Yeah i did figure your solution before i made this topic
That is why i did ask is there a way to do it without extension in gdevelop
So seems there is no native way to do it
IDK why array tools are not integrated to gdevelop