By setting shadowLength to 1, the length of the shadow will be equivalent to the distance from the light to each vertex of the shadow, in pixels. 2 will be twice that, 3 will be three times that distance, and so on.
To modify the variable, just do shadow.shadowLength = value;
All relevant information related to depth can be found here: Troubleshooting.
No worries, feel free to ask any questions you may have :)