2019年8月23日

杨辉三角

摘要: let readline = require("readline-sync"); console.log("请输入杨辉三角的行数: "); let line=readline.question(); let arr=[];//声明一个数组来存储杨辉三角里面的数 let str = ""; // 用于 阅读全文

posted @ 2019-08-23 15:21 他们说我没幽默感 阅读(90) 评论(0) 推荐(0)

找出字符串中出现次数最多的英文 以及出现的次数

摘要: let str="dhgddfhdsgfmhdgffbdhhgbfgshfgaf"; let ldf={},world; for(let i=0;i<str.length;i++){ world=str[i]; if(ldf[world]){ ldf[world]++ }else{ ldf[world]=1; } } var max... 阅读全文

posted @ 2019-08-23 15:20 他们说我没幽默感 阅读(284) 评论(0) 推荐(0)

导航