Refactoring code for more readability
Addressing the duplication, it seems that both conditions are processed the same with the exception of format. You could either provide an inline conditional (ternary statement) to determine the format to use or pass the codeID to a function and return the respective format. At that point the if/else narrows in context and is only applied at the building of strLabel/strLabelPct2. 

The function usage would be more extensible if the need for code modifications were to arise, as such, it would be my preference.

Function:

var applyFormatting = function(codeID, data) {
  if (codeID == 1 || codeID == 32 || codeID == 28 || codeID == 33 || codeID == 10) {
    return  $.formatNumber(data, { format: '#,###', locale: "us" }); 
  }
  return $.formatNumber(data, { format: '#,###.0', locale: "us" }) + "%";
  };

for (var i = 0; i &lt; gl2.length; i++) {                   
  var g2 = globals.featureLayers[2].graphics[i];

  var affectedValue = applyFormatting(codeID, findFips(g2));

  var strLabel2 = g2.attributes.NAME + ":" + affectedValue;
  var textSymbol2 = new esri.symbol.TextSymbol(strLabel2, font);
  textSymbol2.setColor(new dojo.Color([0, 0, 0]));
  var pt2 = g2.geometry.getExtent().getCenter();
  var labelPointGraphic2 = new esri.Graphic(pt2, textSymbol2);

  //add label to the map
  globals.map.graphics.add(labelPointGraphic2);
}  


Ternary: 

 var codesThatAffectLabel = [1, 32, 28, 33, 10];

 for (var i = 0; i &lt; gl2.length; i++) {                   
  var g2 = globals.featureLayers[2].graphics[i];
  var data = findFips(g2);

  var affectedValue = (-1 != codesThatAffectLabel.indexOf(codeID))
                    ? $.formatNumber(data, { format: '#,###', locale: "us" })
                    : $.formatNumber(data, { format: '#,###.0', locale: "us" }) + "%";

  var strLabel2 = g2.attributes.NAME + ":" + affectedValue;
  var textSymbol2 = new esri.symbol.TextSymbol(strLabel2, font);
  textSymbol2.setColor(new dojo.Color([0, 0, 0]));
  var pt2 = g2.geometry.getExtent().getCenter();
  var labelPointGraphic2 = new esri.Graphic(pt2, textSymbol2);

  //add label to the map
  globals.map.graphics.add(labelPointGraphic2);
}