Frequency number

Github链接

TDD作业划分

1.分单词
2.分组
3.排序
4.多个空格

Frequency number 的最终代码

![
![QQ图片20170519232420.png](http://upload-images.jianshu.io/upload_images/5392874-9419b0cfeab70d69.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)]VF(%36@ZVYHO5`S.png](http://upload-images.jianshu.io/upload_images/5392874-878cfe35c0671ebd.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
var format = function (words)
{
   return words ;
}
function main(words)
{
   var t,s;
   var i,string='',string2,count = 0;
   var str = new Array();
   var str2 = new Array();
   var num = new Array();
   str = words.split(/\s+/);
   str2[0] = str[0];
   for (i=0 ;inum[j])
           {
               t=num[i];
               num[i]=num[j];
               num[j]=t;
               s=str2[i];
               str2[i]=str2[j];
               str2[j]=s;
           }
       }
   }
   for (i=0 ;i

测试

Frequency number_第1张图片
QQ图片20170519224058.png

Github推送成功

Frequency number_第2张图片
QQ图片20170519232420.png

你可能感兴趣的:(Frequency number)