If there is a code that is 8 digits long. The numbers 0-9 may be used for any digit.

How many possible codes are there?

Consider the code as 8 spaces for the combination.

___ ___ ___ ___ ___ ___ ___ ___
There are 0-9 numbers (that is 10 options) for each space for the code. And we know that each number can be repeated for any place in the code so,
10 x 10 x 10 x 10 x 10 x 10 x 10 x 10 possible codes.