From b01566509469987e437c1bf628bcd9b5b0a3aa79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=AF=8C=E8=B4=B5?= <2380003452@qq.com> Date: Thu, 27 Oct 2022 04:11:22 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=2036?= =?UTF-8?q?=E9=BB=84=E5=AF=8C=E8=B4=B5/10-26=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\347\261\273\344\275\234\344\270\232.html" | 67 ------------------- ...05\347\261\273\347\254\224\350\256\260.md" | 47 ------------- 2 files changed, 114 deletions(-) delete mode 100644 "36\351\273\204\345\257\214\350\264\265/10-26\344\275\234\344\270\232/10-26-\345\214\205\350\243\205\347\261\273\344\275\234\344\270\232.html" delete mode 100644 "36\351\273\204\345\257\214\350\264\265/10-26\344\275\234\344\270\232/10-26-\345\214\205\350\243\205\347\261\273\347\254\224\350\256\260.md" diff --git "a/36\351\273\204\345\257\214\350\264\265/10-26\344\275\234\344\270\232/10-26-\345\214\205\350\243\205\347\261\273\344\275\234\344\270\232.html" "b/36\351\273\204\345\257\214\350\264\265/10-26\344\275\234\344\270\232/10-26-\345\214\205\350\243\205\347\261\273\344\275\234\344\270\232.html" deleted file mode 100644 index 8c14dd7..0000000 --- "a/36\351\273\204\345\257\214\350\264\265/10-26\344\275\234\344\270\232/10-26-\345\214\205\350\243\205\347\261\273\344\275\234\344\270\232.html" +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - Document - - - - - \ No newline at end of file diff --git "a/36\351\273\204\345\257\214\350\264\265/10-26\344\275\234\344\270\232/10-26-\345\214\205\350\243\205\347\261\273\347\254\224\350\256\260.md" "b/36\351\273\204\345\257\214\350\264\265/10-26\344\275\234\344\270\232/10-26-\345\214\205\350\243\205\347\261\273\347\254\224\350\256\260.md" deleted file mode 100644 index 7d1e8f0..0000000 --- "a/36\351\273\204\345\257\214\350\264\265/10-26\344\275\234\344\270\232/10-26-\345\214\205\350\243\205\347\261\273\347\254\224\350\256\260.md" +++ /dev/null @@ -1,47 +0,0 @@ - 包装类 - 原始数据类型: number, boolean, string, null, undefined (symbol,bigint) - var num = new Number(5) //对象 - num.a = 6 - num = num * 2 //会自动变成原始数据类型number - - var bol = new Boolean(); - bol.a = false - - var str = new String('abc'); - str.a = 'hi' - - 包装类只有:number,boolean,string, - null,undefined是没有包装类的 - - var num = 5; //原始数据类型 - num.a = 7; //1. new Number(5).a = 7 2. delete new Number(5) - console.log(num.a); //new Number(5).a undefined - - const arr = [1,3,4,5] //切片 slice - arr.length = 2 - console.log(arr); - - var str = '1345' //原始数据类型 - str.length = 2 //1.new String('1345').length = 2 2.delete String('1345') - str.aaa = 'a' //new Sting('1345').aaa = a 2.delete String('1345') - console.log(str); - console.log(str.length);//new String('1345').length = 4 - console.log(String.prototype); //String类有很多方法和length - console.log(str.aaa); //new String('1345') - - - -//for ... of :遍历 - for (e of Object.keys(obj)) { - console.log(e); - } - //将键值对成对变成数组放入外层数组(二维数组) - const arr = Object.entries(obj) - console.log(arr); - for(e of Object.entries(obj)){ - console.log(e); - } - -assign:1.浅拷贝一个对象 2.合并对象(target,sources....) - console.log(Object.assign(obj,obj1,obj2,4,false,null,[12,3,34],{name:'张三'})); - console.log(obj[0]); \ No newline at end of file -- Gitee From 7c6a32c20a717c2974172f169fe73cc470d44e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=AF=8C=E8=B4=B5?= <2380003452@qq.com> Date: Thu, 27 Oct 2022 04:11:36 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E9=BB=84=E5=AF=8C=E8=B4=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄富贵 <2380003452@qq.com> --- ...\347\261\273\344\275\234\344\270\232.html" | 67 +++++++++++++++++++ ...05\347\261\273\347\254\224\350\256\260.md" | 47 +++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 "36\351\273\204\345\257\214\350\264\265/10-26\344\275\234\344\270\232/10-26-\345\214\205\350\243\205\347\261\273\344\275\234\344\270\232.html" create mode 100644 "36\351\273\204\345\257\214\350\264\265/10-26\344\275\234\344\270\232/10-26-\345\214\205\350\243\205\347\261\273\347\254\224\350\256\260.md" diff --git "a/36\351\273\204\345\257\214\350\264\265/10-26\344\275\234\344\270\232/10-26-\345\214\205\350\243\205\347\261\273\344\275\234\344\270\232.html" "b/36\351\273\204\345\257\214\350\264\265/10-26\344\275\234\344\270\232/10-26-\345\214\205\350\243\205\347\261\273\344\275\234\344\270\232.html" new file mode 100644 index 0000000..8c14dd7 --- /dev/null +++ "b/36\351\273\204\345\257\214\350\264\265/10-26\344\275\234\344\270\232/10-26-\345\214\205\350\243\205\347\261\273\344\275\234\344\270\232.html" @@ -0,0 +1,67 @@ + + + + + + + Document + + + + + \ No newline at end of file diff --git "a/36\351\273\204\345\257\214\350\264\265/10-26\344\275\234\344\270\232/10-26-\345\214\205\350\243\205\347\261\273\347\254\224\350\256\260.md" "b/36\351\273\204\345\257\214\350\264\265/10-26\344\275\234\344\270\232/10-26-\345\214\205\350\243\205\347\261\273\347\254\224\350\256\260.md" new file mode 100644 index 0000000..7d1e8f0 --- /dev/null +++ "b/36\351\273\204\345\257\214\350\264\265/10-26\344\275\234\344\270\232/10-26-\345\214\205\350\243\205\347\261\273\347\254\224\350\256\260.md" @@ -0,0 +1,47 @@ + 包装类 + 原始数据类型: number, boolean, string, null, undefined (symbol,bigint) + var num = new Number(5) //对象 + num.a = 6 + num = num * 2 //会自动变成原始数据类型number + + var bol = new Boolean(); + bol.a = false + + var str = new String('abc'); + str.a = 'hi' + + 包装类只有:number,boolean,string, + null,undefined是没有包装类的 + + var num = 5; //原始数据类型 + num.a = 7; //1. new Number(5).a = 7 2. delete new Number(5) + console.log(num.a); //new Number(5).a undefined + + const arr = [1,3,4,5] //切片 slice + arr.length = 2 + console.log(arr); + + var str = '1345' //原始数据类型 + str.length = 2 //1.new String('1345').length = 2 2.delete String('1345') + str.aaa = 'a' //new Sting('1345').aaa = a 2.delete String('1345') + console.log(str); + console.log(str.length);//new String('1345').length = 4 + console.log(String.prototype); //String类有很多方法和length + console.log(str.aaa); //new String('1345') + + + +//for ... of :遍历 + for (e of Object.keys(obj)) { + console.log(e); + } + //将键值对成对变成数组放入外层数组(二维数组) + const arr = Object.entries(obj) + console.log(arr); + for(e of Object.entries(obj)){ + console.log(e); + } + +assign:1.浅拷贝一个对象 2.合并对象(target,sources....) + console.log(Object.assign(obj,obj1,obj2,4,false,null,[12,3,34],{name:'张三'})); + console.log(obj[0]); \ No newline at end of file -- Gitee