I am trying to convert some VBA excel code to JS, but even I was sure of me, the code does not work properly. Here are the snippets which cause me problems :
VBA: Tri1 = Tri1 + 2 ^ (2 - Tour)
JS: tri1 = tri1 + Math.pow(2, (2 - tour));
And:
VBA: If (y And (2 ^ (5 - Tour))) <> (Tri2 And 2 ^ (5 - Tour)) Then
JS: if ((y && Math.pow(2, 5 - tour)) != (tri2 && Math.pow(2, 5 - tour)))
And :
VBA: If (Tri1 And 2 ^ (2 - Tour)) = 0 Then
JS: if ((tri1 && Math.pow(2, 2 - tour)) == 0)
tri1, tri2 and y are all integers.
I have good understanding of JS, but none in VBA. So I googled a lot before already.
Thanks !