2 added 228 characters in body

# JavaScript (Node.js), 2222 17 bytes

(x,y)=>(y&1?y-x:y+x)&7=>y+x*7**y&7


Try it online!Try it online! Port of my answer to Cayley Table of the Dihedral Group $D_3$ but golfed down using the suggestions on my Python answer. Uses the following mapping:

 id | r1 | r2 | r3 | s0 | s1 | s2 | s3
----+----+----+----+----+----+----+----
0  | 2  | 4  | 6  | 1  | 3  | 5  | 7


Older versions of JavaScript can be supported in a number of ways for 22 bytes:

(x,y)=>(y&1?y-x:y+x)&7
(x,y)=>y-x*(y&1||-1)&7
(x,y)=>y+x*(y<<31|1)&7


# JavaScript (Node.js), 22 bytes

(x,y)=>(y&1?y-x:y+x)&7


Try it online! Port of my answer to Cayley Table of the Dihedral Group $D_3$. Uses the following mapping:

 id | r1 | r2 | r3 | s0 | s1 | s2 | s3
----+----+----+----+----+----+----+----
0  | 2  | 4  | 6  | 1  | 3  | 5  | 7


# JavaScript (Node.js), 22 17 bytes

(x,y)=>y+x*7**y&7


Try it online! Port of my answer to Cayley Table of the Dihedral Group $D_3$ but golfed down using the suggestions on my Python answer. Uses the following mapping:

 id | r1 | r2 | r3 | s0 | s1 | s2 | s3
----+----+----+----+----+----+----+----
0  | 2  | 4  | 6  | 1  | 3  | 5  | 7


Older versions of JavaScript can be supported in a number of ways for 22 bytes:

(x,y)=>(y&1?y-x:y+x)&7
(x,y)=>y-x*(y&1||-1)&7
(x,y)=>y+x*(y<<31|1)&7

1

# JavaScript (Node.js), 22 bytes

(x,y)=>(y&1?y-x:y+x)&7


Try it online! Port of my answer to Cayley Table of the Dihedral Group $D_3$. Uses the following mapping:

 id | r1 | r2 | r3 | s0 | s1 | s2 | s3
----+----+----+----+----+----+----+----
0  | 2  | 4  | 6  | 1  | 3  | 5  | 7