随笔分类 -  尚硅谷-promise

摘要:初始结构搭建: index.html: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1. 阅读全文
posted @ 2021-06-20 12:26 juham 阅读(277) 评论(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-20 11:17 juham 阅读(66) 评论(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:12 juham 阅读(20) 评论(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 阅读(53) 评论(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 阅读(77) 评论(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-05-15 23:03 juham 阅读(46) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-05-15 21:55 juham 阅读(44) 评论(0) 推荐(0)
摘要:函数对象与实例对象: 同步与异步函数: 阅读全文
posted @ 2021-05-15 21:45 juham 阅读(52) 评论(0) 推荐(0)