Is it possible to have a string of numbers, let's say generated by this operation
var s = "1";
onEvent("start", "click", function() {
for (var i = 2; i < 51; i++){
s = s+", "+i;
if(i==50){
setText("text", s);
}
}
});
Thus making s equal the sting of numbers "1, 2, 3, etc." now lets say there's a different function that tries to check if s ( the string ) has a certain number inside of it,
if(n == "number in s" ){
*function*
}
Now how are we able to find a singular number inside a string and compare it to another variable? "number in s" is the number being compared to the variable, 'n'. Now 'n' can change values but the function would should run if "number in s" contains all options for 'n'