1. I used to think judgment is
If (element [I]=="compititor") {do STH}
But now must write in this way can we run:
If (element [I]="compititor") {do STH}
2. I used to think two judgment conditions to write:
If (element [I]=="compititor" & amp; & Element [I + 1)=="court") {do STH}
But now only need to meet one condition can run,
3. At noon today have more magical things
Write the if () {} else if () {} don't run, but it can remove the else,
The confusion and the really big for me, this two days is on alert to verify that this or that write the right
CodePudding user response:
1 element [I]="compititor" this is the assignment, not to judge,2 the element element [I] [I + 1] alert out and see what is value
CodePudding user response:
Is not upset you know, your code logic has a problem,You are in accordance with the if the else conditions in order to click? Element data increased when the click, but I did not change, so the element element is always [0], [I] element [0]==first click the value of the object, so later you click another object, you think the if element [I] will meet other click the value of the object, but the element [I] actually did not change (I've been is 0), so you think you know overturned, in plain English is you give yourself to dig pits, bug yourself not to come out,
CodePudding user response: