2

Cyclomatic complexity is a measure of the number of possible paths thorough some code. For example an if statement with one clause eg if (foo) {} has two paths, One if foo is true and one if false. Any point where the code can branch, the branches are counted as part of the cyclomatic complexity. Unfortunately how the complexity is summed differs so without ...


1

const vs let First I would like to applaud the use of const in some places. There are however places where const could be used instead of let - e.g. for optimalPath, since it never gets re-assigned. It is advised to default to using const and then switch to let when re-assignment is deemed necessary. This helps avoid accidental re-assignment and other bugs. ...


Only top voted, non community-wiki answers of a minimum length are eligible