I have a do-while loop that loops for the maximum value of a localStorage variable. Each iteration creates a specific <li> statement. That logic works fine. I want to include an IF statement that will only allow the <li> statement to be created IF a specific condition of the localStorage variable is met.
If localStorage.[item + i] = "X" then I do NOT want to create the <li> statement. I simply want to increment the variable i and continue the do-while loop.
Here is the code that I am working with:
if localStorage["item" + i] = "X"
+ localStorage["item" + i]
+ "&lsitag=" + "itag" + i
+ "&lsitem=" + "item" + i
+ "&lsdesc=" + "desc" + i
+ localStorage["item" + i] + "-"
+ localStorage["desc" + i] +"</a></li>");