src/language-js/needs-parens.js/isPathInForStatementInitializer
function isPathInForStatementInitializer(path) {
  let i = 0;
  let node = path.getValue();
  while (node) {
    const parent = path.getParentNode(i++);
    if (parent && parent.type === "ForStatement" && parent.init === node) {
      return true;
    }
    node = parent;
  }

  return false;
}