var out = []; while( k < PointNumber ){ out[ out.length ] = ".number"+(++k); } var $result = $( out.join(",") );