摘要: 类型转换:typeof返回的值的类型是String 显示类型转换 Number(mix) parseInt(string,radix) perseFloat(string) toString((radix) null undefind不可以使用,报错 String(mix) Boolean() 隐藏 阅读全文
posted @ 2020-07-03 14:35 carrieLee 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-07-03 14:28 carrieLee 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 数组定义 第一种方法:使用 Array 构造函数 ,可以省略 new 操作符 eg: let arr = new Array() let arr = new Array(20) 数组长度为20 let arr =new( 'yellow', 'red' , 'blue' ) 第二种方法:数组字面量表 阅读全文
posted @ 2020-04-20 16:29 carrieLee 阅读(116) 评论(0) 推荐(0) 编辑
摘要: let arr1 = ['one', 'two', 'there'], arr2 = ['red', 'yellow', 'blue'], arr3 = ['brid', 'dog', 'pig'], arr4 = ['orange','apple','banner' 阅读全文
posted @ 2020-04-20 14:52 carrieLee 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 一、typeof 适合基本类型及function检测,遇到null失效 二、instanceof 适合自定义对象,也可以用检测原生对象,在不同iframe和window间检测时失效 三.Object.prototype.toStirng.call()和Object.prototype.toStrin 阅读全文
posted @ 2019-12-25 10:49 carrieLee 阅读(1125) 评论(0) 推荐(0) 编辑
摘要: 面对对象的三大特征:封闭、继承、多态 七大基本原则: 1.单一职责 2.开闭原则 3.里氏替换 4.依赖倒置 5.接口隔离 6.迪米特法则 7.01组合/聚合复用原则 阅读全文
posted @ 2019-10-10 16:51 carrieLee 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 一、创建 Date 对象 1.new Date() 当前日期和时间 2. new Date(milliseconds) 参数(milliseconds):从1970年1月1日00:00:00 UTC开始计算的毫秒数。如果将Unix时间戳作为参数,必须将Unix时间戳乘以1000。 【unix时间戳是 阅读全文
posted @ 2019-07-04 11:50 carrieLee 阅读(500) 评论(0) 推荐(0) 编辑
摘要: 第一步,创建仓库 登录自己的码云 第二步,本地操作 1.到你所要上传的文件夹中右键 选择git bash here 2.初始化项目 git init 3.连接远程仓库 刚才我们建立的时候的远程地址就用到了 git remote add origin +仓库地址 4.开始上传 输入git push - 阅读全文
posted @ 2019-05-31 17:33 carrieLee 阅读(959) 评论(0) 推荐(0) 编辑
摘要: JavaScript检测横屏 window.addEventListener("resize",()=>{ if(window.orientation 180||window.orientation 0) { // 正常方向或屏幕旋转180度 console.log('竖屏'); }; if(win 阅读全文
posted @ 2019-05-20 14:33 carrieLee 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 安全区域 安全区域是一个不受 圆角( corners)、刘海( sensor housing)和小黑条( HomeIndicator)的可视窗口范围 为了保证页面的显示效果,我们必须把页面限制在安全范围内,但是不影响整体效果 viewport-fit viewport-fit是专门为了适配 iPho 阅读全文
posted @ 2019-05-20 14:25 carrieLee 阅读(184) 评论(0) 推荐(0) 编辑