code: public static JsExpr concatJsExprs(List<? extends JsExpr> jsExprs) {
      if (jsExprs.isEmpty()) {
        return EMPTY_STRING;
      }
  
      if (jsExprs.size() == 1) {
        return jsExprs.get(0);
      }
  
      int plusOpPrec = Operator.PLUS.getPrecedence();
      StringBuilder resultSb = new StringBuilder();
  
      boolean isFirst = true;
      for (JsExpr jsExpr : jsExprs) {
  
        // The first operand needs protection only if it's strictly lower precedence. The non-first
        // operands need protection when they're lower or equal precedence. (This is true for all
        // left-associative operators.)
        boolean needsProtection =
            isFirst ? jsExpr.getPrecedence() < plusOpPrec : jsExpr.getPrecedence() <= plusOpPrec;
  
        if (isFirst) {
          isFirst = false;
        } else {
          resultSb.append(" + ");
        }
  
        if (needsProtection) {
          resultSb.append('(').append(jsExpr.getText()).append(')');
        } else {
          resultSb.append(jsExpr.getText());
        }
      }
  
      return new JsExpr(resultSb.toString(), plusOpPrec);
    }
docs: Builds one JS expression that computes the concatenation of the given JS expressions. The '+'
  operator is used for concatenation. Operands will be protected with an extra pair of
  parentheses if and only if needed.
  
  <p>The resulting expression is not guaranteed to be a string if the operands do not produce
  strings when combined with the plus operator; e.g. 2+2 might be 4 instead of '22'.
  
  @param jsExprs The JS expressions to concatentate.
  @return One JS expression that computes the concatenation of the given JS expressions.