摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Promise A 阅读全文
posted @ 2021-06-19 23:12 juham 阅读(21) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Promise A 阅读全文
posted @ 2021-06-19 23:09 juham 阅读(27) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Promise A 阅读全文
posted @ 2021-06-19 23:04 juham 阅读(220) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Promise A 阅读全文
posted @ 2021-06-19 23:03 juham 阅读(55) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Promise A 阅读全文
posted @ 2021-06-19 23:00 juham 阅读(45) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-06-19 22:57 juham 阅读(61) 评论(0) 推荐(0)
摘要: * 封装一个函数 mineReadFile 读取文件内容 * 参数: path 文件路径 * 返回: promise 对象 */ function mineReadFile(path){ return new Promise((resolve, reject) => { //读取文件 require 阅读全文
posted @ 2021-06-19 22:37 juham 阅读(78) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Promise 封 阅读全文
posted @ 2021-06-19 22:34 juham 阅读(21) 评论(0) 推荐(0)
摘要: // const fs = require('fs'); //回调函数 形式 // fs.readFile('./resource/content.txt', (err, data) => { // // 如果出错 则抛出错误 // if(err) throw err; // //输出文件内容 // 阅读全文
posted @ 2021-06-19 22:29 juham 阅读(35) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-06-19 18:00 juham 阅读(23) 评论(0) 推荐(0)