随笔分类 - JavaScript
摘要:输入: Random testing is not only a useful testing technique in itself, but also plays a core role in many other testing methods. Hence, any significant
阅读全文
摘要:索引 简介 测试用例 代码 简介 * 用Regex辅助生成文章目录 2.0 * 1、提高了功能的通用性(假定的文章格式更加普遍,即按照h2h3h4分级) * 2、改善了代码的可读性 * 3、略微。。提高了扩展性(只需要重写generateDirectory方法就可以 * 生成自定义目录) * 缺点:
阅读全文
摘要:饮水思源:https://www.bilibili.com/video/av12296198 1、画背景 2、添加一个拖动小球的功能(用于测试)顺便把makeBall()改为class Ball let pause = false; let enableDebugMode = function(ga
阅读全文
摘要:饮水思源:https://www.bilibili.com/video/av12198966 自定义log &显示分数: //let log = console.log.bind(console); let e = sel => document.querySelector(sel); let lo
阅读全文
摘要:饮水思源:https://www.bilibili.com/video/av12168808 添加砖块(先写一个砖块 再弄成n个)&通过暂停与减速来debug: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title>
阅读全文
摘要:饮水思源:https://www.bilibili.com/video/av12138532 原始版本: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> canv
阅读全文
摘要:算法盒子初代(为了提高学习算法的热情。。。) 效果图: 所有代码放在单个html中: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <textarea id="data-area
阅读全文
摘要:索引 Notes fetch form focus Disabled fields form’s elements property 阻止提交 快速插入单词 实时统计字数 监听checkbox和radio 监听select 上传文件 本地存储数据 Exercises Content negotiat
阅读全文
摘要:索引 Notes onclick removeEventListener Event objects stopPropagation event.target Default actions Key events Mouse motion Touch events Scroll events Foc
阅读全文
摘要:索引 Notes js与html DOM 在DOM树中移动 在DOM中寻找元素 改变Document 创建节点 html元素属性 布局 style CSS选择器 动画 Exercises Build a table Elements by tag name The cat 索引 Notes js与h
阅读全文
摘要:索引 回调版本 Promise版本1 Promise版本2 Notes 参考资料: Promise JavaScript Promise:简介 你去书店借书,按照异步的套路,剧情如下↓ 你:“老板,有xxx吗?” 老板:“你等下,我得找一找看,到时候打电话给你。” 然后你就去做其它事情了。 1、回调
阅读全文
摘要:索引 Notes 背景问题 模块Modules 软件包Packages 简易模块 Evaluating data as code CommonJS modules ECMAScript modules Building and bundling 模块设计建议 Exercises A modular
阅读全文
摘要:PS. 用来生成个人笔记的目录 1、输入:html文本 <h2>Notes</h2> <p>1、小标题1。正文正文正文</p> <div class="cnblogs_code"> <pre><span style="color: #000000;">ddjlasjdlas </span><span
阅读全文
摘要:索引 Notes js创建正则表达式的两种方式 js正则匹配方式(1) 字符集合 重复匹配 分组(子表达式) js正则匹配方式(2) The Date class 匹配整个字符串 Choice patterns 正则匹配的机制 回溯Backtracking Replace 贪婪匹配Greed 动态构
阅读全文
摘要:索引 Notes strict mode js类型 js测试 Debugging Exceptions finally 异常分支 Exercise Retry The locked box 索引 Notes strict mode js类型 js测试 Debugging Exceptions fin
阅读全文
摘要:索引 Notes Excercise Measuring a robot Robot efficiency Persistent group 索引 Notes Excercise Measuring a robot Robot efficiency Persistent group Notes Ex
阅读全文
摘要:索引 Notes this Prototype 类 class符号 覆盖派生属性 Maps Symbols iterator接口 Getters, setters, and statics 继承 instanceof Excercise A vector type Groups Iterable g
阅读全文
摘要:索引 Notes 高阶函数 forEach filter map reduce some findIndex 重写课本示例代码 Excercises Flattening Your own loop Everything Dominant writing direction Notes 1、高阶函数
阅读全文
摘要:要点索引: JSON More ... 练习 要点索引: JSON More ... 练习 1、补:js字符串的表达方式有三种: "" 和 '' 没什么区别,唯一区别在于 "" 中写 "要转义字符,在 '' 中写 ' 要转义字符。最后一种是 `` ,允许 'xx = ${算式}' 的简写方式。 2、
阅读全文
摘要:索引: let VS. var 定义函数的几种方式 more... 索引: let VS. var 定义函数的几种方式 more... 1、作者反复用的side effect side effect就是对世界造成的改变,例如说打印某些东西到屏幕,或者以某种方式改变机器的内部状态从而影响到后面的语句。
阅读全文