1 Star 0 Fork 0

web_in_action/node_in_action

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
handleGrades.js 377 Bytes
一键复制 编辑 原始数据 按行查看 历史
luohanye 提交于 2022-07-26 20:56 +08:00 . first commit
const fs = require('fs')
fs.readFile('./files/grades.txt','utf8',function(err,dataStr){
if(err){
return console.log('文件读取失败:'+err)
}
const grade_arr=dataStr.split(' ');
console.log(grade_arr)
const new_grade_arr=[];
grade_arr.forEach(item=>{
new_grade_arr.push(item.replace('=',':'))
})
const newStr=new_grade_arr.join('\r\n')
console.log(newStr)
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/web_in_action/node_in_action.git
git@gitee.com:web_in_action/node_in_action.git
web_in_action
node_in_action
node_in_action
master

搜索帮助