how would one convert this Visual Basic Code into JavaScript?

Dim counter As Integer
Dim counter1 As Integer
Dim counter3 As Integer
Dim x As Integer
Dim i As Integer
Dim strLockerOpenClosed As String
List1.Clear

i = 1

Do Until counter3 > 60
For x = 0 To 60 Step i
truefalse(x) = Not truefalse(x)
Next x
i = i + 1
counter3 = counter3 + 1
Loop