I have 2 arrays :
A1=[num1,num2,num3]
B1=[digit1,digit2,digit3]
I want to create a function that :
gets digit1, digit2 and digit3 and compares them with A1 elements and do the following:
if(digit1>num1)
//draw next page
else if(digit1<num1)
//go to previous page
else if(digit1==num1)
//go and check "digit2" with "num2"
if(digit2>num2)
//draw next frame
else if(digit2<num2)
//remove the latest frame added
else if(digit2==num2)
//got check "digit3" with "num3"
if(digit3>num3)
//draw a div
else if(digit3<num3)
//remove the previous div added
else if(digit3==num3)
//some statement
Is there any way I can avoid all this "if-else" and implement this using perhaps a for loop?
//some statement? The same everywhere?