随笔分类 - JavaScripty的学习
摘要:1 基本数据类型 字符串 数字 布尔 空null, 未定义undefined Symbol (es6引入,表示独一无二的值)共6种基本类型 2 引用数据类型(对象类型) 对象(JSON送对象) 数组 函数 RegExp正则 日期Date 5类 3 变量没有类型可言,只有对象才有类型可言 4 小心:
阅读全文
摘要:1 通过prototype原型对象继承 function Hello(){ this.a = "吃饭了" this.b = function(){ console.log(" 123") }}function Test(){ this.c = function(){ console.log("-cc
阅读全文
摘要:var a = '[1,2,3]' var b = a.toString() var c = {'a':1123,'b':22} var d = JSON.parse(a) console.log(c['a']); //kv形式的json对象console.log(d[0]) //数组形式的json
阅读全文
摘要:new Date().toLocaleString().replace('/','-').replace('/','-')
阅读全文