摘要: 1. 使用getter和setter控制属性访问 1.1 定义getter与setter 通过对象字面量定义,或在ES6的class中定义 // 通过对象字面量定义 const students = { student: ["Wango", "Lily", "Jack"], // 使用set和get 阅读全文
posted @ 2020-11-24 20:20 LiuWango 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 1. 理解原型 const device = { powerSource: "battery", displayDevice: true } const phone = { size: "small" } const huaweiPhone = { os: "HarmonyOS" } // Obje 阅读全文
posted @ 2020-11-23 23:59 LiuWango 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 通过编辑~/.termux/termux.properties配置 extra-keys = [\ ['ESC', 'CTRL', '&', '$', '!', '%', '<', '>'], \ ['APOSTROPHE', 'QUOTE', ':', '`', '+', '-', '(', ') 阅读全文
posted @ 2020-11-22 23:46 LiuWango 阅读(2178) 评论(0) 推荐(0) 编辑
摘要: 不缓存当前页面 <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> 不缓存 阅读全文
posted @ 2020-11-22 23:36 LiuWango 阅读(246) 评论(0) 推荐(0) 编辑
摘要: Termux安装配置设置参见: 国光:Termux高级终端使用配置教程 搭建FTP服务器参见: Termux安装使用FTP服务器 阅读全文
posted @ 2020-11-22 23:35 LiuWango 阅读(3360) 评论(0) 推荐(0) 编辑
摘要: 1. 生成器函数 1.1 定义生成器函数 // 在关键字function后面添加 * 定义生成器函数 function* newGenerator() { // ... // 在生成器内部使用yield生成独立的值 yield "One"; yield "Two"; // ... } // 调用生成 阅读全文
posted @ 2020-11-22 17:40 LiuWango 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 1. 理解闭包 闭包允许函数访问并操作函数外部的变量。只要变量或函数存在于声明函数时的作用域内,闭包即可使函数能够访问这些变量或函数 var outerName = "Wango"; var fn; function outerFn() { var innerName = "Lily"; funct 阅读全文
posted @ 2020-11-19 23:07 LiuWango 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 1. 隐式函数参数 arguments 所有参数集合 function foo() { console.log(arguments); console.log(arguments[0]); console.log(arguments.length); } foo(1, 2, 3); // Argum 阅读全文
posted @ 2020-11-18 22:12 LiuWango 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 1. 函数与对象的区别 function foo(){} class Cls {} foo(); // 函数是可调用的 Cls(); // Uncaught TypeError: Class constructor Cls cannot be invoked without 'new' 2. 回调函 阅读全文
posted @ 2020-11-17 23:09 LiuWango 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 1. Web应用的生命周期 用户输入URL(或者单击链接) --> 生命周期开始 浏览器生成请求并发送到服务器 服务器执行某些动作或者获取某些资源;将响应发回客户端 浏览器处理HTML、CSS和JavaScript并构建结果页面 浏览器监控事件队列,一次处理其中一个事件 用户与页面元素交互 用户关闭 阅读全文
posted @ 2020-11-17 23:08 LiuWango 阅读(96) 评论(0) 推荐(0) 编辑