Помогите пожалуйста с переводом c vba на js
Dim i As Integer
Dim k As Integer
Dim k1 As Integer
Dim r As Integer
Cells(ActiveCell.Row, 2).Interior.Color = QBColor(15)
Cells(ActiveCell.Row, 2).Value = 0
k = 0
k1 = 0
For i = 3 To 15
If Cells(ActiveCell.Row, i).Value = "1" Then
k = k + 1
ElseIf Cells(ActiveCell.Row, i).Value = "2" Then
k1 = k1 + 1
End If
Next i
r = k - k1
If r <> 0 Then
Cells(ActiveCell.Row, 2) = r
Else
Cells(ActiveCell.Row, 2).Interior.Color = QBColor(10)
End If
End Sub