code: public final boolean isInferredConst() {
      if (nameNode == null) {
        return false;
      }
  
      return nameNode.getBooleanProp(Node.IS_CONSTANT_VAR)
          || nameNode.getBooleanProp(Node.IS_CONSTANT_NAME);
    }
docs: Returns {@code true} if the variable is declared as a constant,
  based on the value reported by {@code NodeUtil}.