2021年4月9日

递归求1-100之和

摘要: 递归求1-100之和 /* *求1-100之和 */ function sum(num1, num2) { var num = num1 + num2; if (num2 + 1 > 100) { return num; } else { return sum(num, num2 + 1) } } 阅读全文

posted @ 2021-04-09 18:00 zhishiyv 阅读(134) 评论(0) 推荐(0) 编辑

border属性

摘要: border属性: 示例一、 样式代码: display: block; width: 240rpx; height: 240rpx; border-right: 100px solid #d8d8d8; border-top: 100px solid red; border-bottom: 100 阅读全文

posted @ 2021-04-09 14:01 zhishiyv 阅读(246) 评论(0) 推荐(0) 编辑

ES6 Class

摘要: JavaScript语言中,生成实例对象的传统方法是通过构造函数 function Point(x,y){ this.x = x; this.y = y; } Point.prototype.toString = function (){ return '('+this.x + ',' + this 阅读全文

posted @ 2021-04-09 10:13 zhishiyv 阅读(40) 评论(0) 推荐(0) 编辑

导航