How do you document code?

Daniel Schulz - Jun 28 '19 - - Dev Community

Today I got into a discussion with a colleague on how to document code within a large web project. My preferred method is to trust my code to be self-explaining on what it does and rely on JSDocs or block comments for why it does its thing. Hacky or weird lines get the occasional line comment.
I dislike documenting my code in other places (like wikis or tickets), because that gets outdated and forgotten pretty quickly.

How do you handle that?
Do you trust your code to be self-explaining? Do you use JSDocs/PHPDocs/etc? Do you comment extensively? Or maintain a huge wiki?
What works out for you and why?

. . . . . . . . . . . . . . . . . . . . . . . .