10 of 12 minor update

# JavaScript (Node.js),  89 ... 85  78 bytes

s=>'318462.7905'[Buffer(s).map(c=>o|=p*=4**(c%5)/8,o=p=16384)|(o/=o&-o)%45%11]


Try it online!

### How?

We take the ASCII code $$\c\$$ of the direction character modulo $$\5\$$ to map it to an index in $$\\{0,1,2,3\}\$$.

For each direction, we update a bit mask $$\p\$$ by shifting it by a specific amount and mark the bits that are visited in another bit mask $$\o\$$.

 char. | ASCII | mod 5 | shift
-------+-------+-------+-------
'U'  |   85  |   0   | >> 3
'L'  |   76  |   1   | >> 1
'R'  |   82  |   2   | << 1
'D'  |   68  |   3   | << 3


Conveniently, the shift is equivalent to multiply $$\p\$$ by:

$$\frac{4^{(c\bmod 5)}}{8}$$

We start with both $$\p\$$ and $$\o\$$ set to $$\2^{14}=16384\$$. This value is safe because we will never right-shift by more than $$\4\times 3 + 2\times 1=14\$$ (e.g. with "UUUULL", which draws a $$\7\$$, or any other path going from the bottom-right to the top-left corner).

Because we don't know which cell in the digit was our starting point, we normalize the final value of $$\o\$$ by removing all trailing zeros:

o /= o & -o


We end up with a unique 15-bit key identifying the digit. It can be seen as a binary representation of the digit shape rotated by 180°. For instance:

                       100    111
100    001
100 100 100 100 111 -> 100 -> 001 -> "7"
100    001
111    001


We apply the following hash function to turn it into an index $$\\in\{0,1,2,3,4,5,7,8,9,10\}\$$ and pick the answer from a small lookup table:

$$f(n)=(n \bmod 45)\bmod 11$$

 digit |   binary mask   | decimal | mod 45 | mod 11
-------+-----------------+---------+--------+--------
0   | 111101101101111 |  31599  |    9   |   9
1   | 001001001001001 |   4681  |    1   |   1
2   | 111001111100111 |  29671  |   16   |   5
3   | 111100111100111 |  31207  |   22   |   0
4   | 100100111101101 |  18925  |   25   |   3
5   | 111100111001111 |  31183  |   43   |  10
6   | 111101111001111 |  31695  |   15   |   4
7   | 100100100100111 |  18727  |    7   |   7
8   | 111101111101111 |  31727  |    2   |   2
9   | 111100111101111 |  31215  |   30   |   8