Answer the question
In order to leave comments, you need to log in
How to make range for values?
I have a variable that changes every second
. So, I need to get the maximum and minimum values from it, then find out the average of these numbers
. " is a variable, not a predefined number.
I didn’t find anything sensible, either restrictions on numbers, or searching for numbers in an array
Answer the question
In order to leave comments, you need to log in
var твоя_переменная = ;
var min = 0;
var max = 0;
if(твоя_переменная < min) {
min = твоя_переменная;
}
if(твоя_переменная > max ) {
max = твоя_переменная;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question