![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
前端框架原理与组件
npm scripts AngularJS React全家通 Vue Redux 浏览器工作原理
HYTZZ
你才懒
展开
-
generator的工作原理
generator的工作原理使用示例useage例子:基本用法// 定义function* test(args){ console.log('start-->>>',args); yield 'test-1'; console.log('args-->>>',args); yield 'test-2'; return 'test-3';}// 像普通函数一样执行const tt = test('ccc');//原创 2021-07-09 08:27:11 · 579 阅读 · 0 评论 -
js 原型继承
<script> function SuperType(){ this.property = true; } SuperType.prototype.getSuperValue = function(){ return this.property; } function SubType(){ this.subproperty = false; } SubType.prototype = new原创 2021-05-25 19:47:05 · 50 阅读 · 0 评论 -
jquery-ui widget源码
<script> $.Widget = function () { } $.Widget._childConstructors = []; $.Widget.prototype = { widgetName: "widget", widgetEventPrefix: "", defaultElement: "<div>", options: { classes: {},原创 2021-05-25 13:04:14 · 208 阅读 · 0 评论 -
getPrototypeOf、setPrototypeOf
<script> Object.appendChain = function (oChain, oProto) { if (arguments.length < 2) { throw new TypeError('Object.appendChain - Not enough arguments'); } if (typeof oProto === 'nu原创 2021-05-25 12:38:13 · 156 阅读 · 0 评论 -
javascript instaceof
<script>//instanceof 运算符用来检测 constructor.prototype 是否存在于参数 object 的原型链上 function C(){} var o = new C(); // C.prototype == o.__proto__ // 默认原型 console.log(o instanceof C); C.prototype = {name:'123'}; var o2 = new C();原创 2021-05-25 12:37:13 · 69 阅读 · 0 评论 -
javascript继承
function object(o) { function F() {} F.prototype = o; return new F();}var mm = object({name:'123'});let animal = { eats: true};let rabbit = Object.create(animal);console控制台打印原创 2021-05-25 10:44:53 · 102 阅读 · 1 评论 -
JavaScript类
https://zh.javascript.info/class-inheritance#homeobject转载 2021-05-24 18:52:11 · 69 阅读 · 0 评论 -
typescript 泛型
function add(arg1: T, arg2: T): T{return arg1 + arg2;}add(1, 2);add(‘1’, ‘2’);let addFn: (arg1: T, arg2: T) => T;addFn = add;addFn(‘1’, ‘2’);addFn(1,2);let addFn2: { (arg1: T, arg2: T): T };addFn2 = add;addFn2(‘3’, ‘4’);addFn2(3, 4);interfa原创 2021-05-03 07:07:13 · 103 阅读 · 0 评论 -
编程语言特性
变量定义算术运算for 循环语句,while 循环语句函数定义,函数调用递归静态类型系统类型推导lambda 函数面向对象垃圾回收指针算术goto 语句原创 2021-04-25 10:57:25 · 149 阅读 · 0 评论