[Solved] how do you understand javascript code that is not written by you


What I typically do is follow the call-in logic from outer layers of code inward and instead of trying to grok thousands of lines of someones program, I try to figure out how the pieces I need to work on function.

You don’t read code top-down like you read a book (pages?), you follow calls (initially you can ignore class instantiation) from the outmost position inwards. JavaScript is not a nice language in this regard but still if a compiler/interpreter can read it, so can you.

It’s important to write readable code, and as a professional you should, on a policy level, expect that from other people, but on a technical level, you need to be able to cut through the bushes.

3

solved how do you understand javascript code that is not written by you