From 679ce690ff71abf8144c8d66c1e573cc31a92c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B0=B8=E6=BD=98?= <1924969174@qq.com> Date: Fri, 28 Oct 2022 03:20:56 +0000 Subject: [PATCH 1/8] =?UTF-8?q?=E6=96=B0=E5=BB=BA=202022-10-26=E7=AC=AC?= =?UTF-8?q?=E4=B8=83=E6=AC=A1=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "16\345\210\230\346\260\270\346\275\230/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232/.keep" diff --git "a/16\345\210\230\346\260\270\346\275\230/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232/.keep" "b/16\345\210\230\346\260\270\346\275\230/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From 1f129975a31eec6c5dcced83d649e0a5eaa06a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B0=B8=E6=BD=98?= <1924969174@qq.com> Date: Fri, 28 Oct 2022 03:22:04 +0000 Subject: [PATCH 2/8] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=2016=E5=88=98?= =?UTF-8?q?=E6=B0=B8=E6=BD=98/2022-10-26=E7=AC=AC=E4=B8=83=E6=AC=A1?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=20=E4=B8=BA=2016=E5=88=98=E6=B0=B8=E6=BD=98/?= =?UTF-8?q?2022-10-26=E7=AC=AC=E4=B8=83=E6=AC=A1=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E5=8C=85=E8=A3=85=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename "16\345\210\230\346\260\270\346\275\230/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232/.keep" => "16\345\210\230\346\260\270\346\275\230/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232\345\214\205\350\243\205\347\261\273/.keep" (100%) diff --git "a/16\345\210\230\346\260\270\346\275\230/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232/.keep" "b/16\345\210\230\346\260\270\346\275\230/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232\345\214\205\350\243\205\347\261\273/.keep" similarity index 100% rename from "16\345\210\230\346\260\270\346\275\230/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232/.keep" rename to "16\345\210\230\346\260\270\346\275\230/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232\345\214\205\350\243\205\347\261\273/.keep" -- Gitee From 4a34e4a960e7cdd7a2f38353d3c4e8c413377170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B0=B8=E6=BD=98?= <1924969174@qq.com> Date: Fri, 28 Oct 2022 03:24:41 +0000 Subject: [PATCH 3/8] =?UTF-8?q?16=E5=88=98=E6=B0=B8=E6=BD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘永潘 <1924969174@qq.com> --- ...\345\214\205\350\243\205\347\261\273.html" | 72 ++++++++++++++ ...60\345\214\205\350\243\205\347\261\273.md" | 98 +++++++++++++++++++ 2 files changed, 170 insertions(+) create mode 100644 "16\345\210\230\346\260\270\346\275\230/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232\345\214\205\350\243\205\347\261\273/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232\345\214\205\350\243\205\347\261\273.html" create mode 100644 "16\345\210\230\346\260\270\346\275\230/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232\345\214\205\350\243\205\347\261\273/2022-10-26\347\254\254\344\270\203\346\254\241\347\254\224\350\256\260\345\214\205\350\243\205\347\261\273.md" diff --git "a/16\345\210\230\346\260\270\346\275\230/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232\345\214\205\350\243\205\347\261\273/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232\345\214\205\350\243\205\347\261\273.html" "b/16\345\210\230\346\260\270\346\275\230/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232\345\214\205\350\243\205\347\261\273/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232\345\214\205\350\243\205\347\261\273.html" new file mode 100644 index 0000000..1d65f95 --- /dev/null +++ "b/16\345\210\230\346\260\270\346\275\230/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232\345\214\205\350\243\205\347\261\273/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232\345\214\205\350\243\205\347\261\273.html" @@ -0,0 +1,72 @@ + + + + + + + Document + + + + + + \ No newline at end of file diff --git "a/16\345\210\230\346\260\270\346\275\230/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232\345\214\205\350\243\205\347\261\273/2022-10-26\347\254\254\344\270\203\346\254\241\347\254\224\350\256\260\345\214\205\350\243\205\347\261\273.md" "b/16\345\210\230\346\260\270\346\275\230/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232\345\214\205\350\243\205\347\261\273/2022-10-26\347\254\254\344\270\203\346\254\241\347\254\224\350\256\260\345\214\205\350\243\205\347\261\273.md" new file mode 100644 index 0000000..c55d6b2 --- /dev/null +++ "b/16\345\210\230\346\260\270\346\275\230/2022-10-26\347\254\254\344\270\203\346\254\241\344\275\234\344\270\232\345\214\205\350\243\205\347\261\273/2022-10-26\347\254\254\344\270\203\346\254\241\347\254\224\350\256\260\345\214\205\350\243\205\347\261\273.md" @@ -0,0 +1,98 @@ + //keys,values,entries,obj + + var obj = { + name: '李华', + age: 17, + gender: '男' + + } + //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); + } + + //obj本身是不可迭代的对象 + for(e of obj){ + console.log(e); + } + + assign:拷贝,浅拷贝(复制的是对象的地址),(手写一个对象的深拷贝)深拷贝(复制的的对象本身) + var obj = { + name: '李华', + age: 16, + gender: '男' + } + var obj1 = { + name: '李四', + title: 'student' + } + var obj2 = { + name:'王五' + } + var obj3 = { + name:'张三' + } + var obj2 = Object.assign(obj); + + age gender name title + assign:1.浅拷贝一个对象 2.合并对象(target,sources....) + console.log(Object.assign(obj,obj1,obj2,4,false,null,[12,3,34],{name:'张三'})); + console.log(obj[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') + + + console.log('------'); + var num = 50 + num.length = 1 + console.log(num.length); + console.log(Number.prototype); + + //null undefined 没有包装 + + + + + 总结 合并对象 + var target = {name:'李华'} + var obj = {name:'王五'} + console.log(Object.assign(2,obj)); //number + console.log(Object.assign(false,target)); //boolean + //包装类:自动转成对象 + console.log(Object.assign(undefined,obj)); //null undefined \ No newline at end of file -- Gitee From 20c499e4345ea0d159f5575419505169fe0198fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B0=B8=E6=BD=98?= <1924969174@qq.com> Date: Fri, 28 Oct 2022 03:25:40 +0000 Subject: [PATCH 4/8] =?UTF-8?q?=E6=96=B0=E5=BB=BA=202022-10-27=E7=AC=AC?= =?UTF-8?q?=E5=85=AB=E6=AC=A1=E4=BD=9C=E4=B8=9Amap=E5=92=8Cset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set/.keep" diff --git "a/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set/.keep" "b/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From 99fbd997dd34e951a3b7b842857d03f89c62e025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B0=B8=E6=BD=98?= <1924969174@qq.com> Date: Fri, 28 Oct 2022 03:25:56 +0000 Subject: [PATCH 5/8] =?UTF-8?q?16=E5=88=98=E6=B0=B8=E6=BD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘永潘 <1924969174@qq.com> --- ...75\234\344\270\232map\345\222\214set.html" | 22 +++++++++++++++++++ ...\254\224\350\256\260map\345\222\214set.md" | 15 +++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 "16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set.html" create mode 100644 "16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\347\254\224\350\256\260map\345\222\214set.md" diff --git "a/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set.html" "b/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set.html" new file mode 100644 index 0000000..b89b37f --- /dev/null +++ "b/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set.html" @@ -0,0 +1,22 @@ + + + + + + + Document + + + + + \ No newline at end of file diff --git "a/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\347\254\224\350\256\260map\345\222\214set.md" "b/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\347\254\224\350\256\260map\345\222\214set.md" new file mode 100644 index 0000000..e48d984 --- /dev/null +++ "b/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\347\254\224\350\256\260map\345\222\214set.md" @@ -0,0 +1,15 @@ +引用型:function, array, obj, +ES6: map set +Map:键值对,类似于对象 +map.set()改 +例子:map.set(5,zoe)加入要改的值 ++0和-0虽然===是false但是还是算一个元素 +map转数组 +例子: + const arr = [...map] + const arr = [] + for(let e of map.entries()){arr.push(e)} +数组转map +例子: + const arr = [['name', 'zoe'], ['age', 18]] + var map = new Map([['name', 'zoe'], ['age', 18]]) \ No newline at end of file -- Gitee From 0e824773dd030bb8106d69d150c321bc91235c20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B0=B8=E6=BD=98?= <1924969174@qq.com> Date: Fri, 28 Oct 2022 03:26:12 +0000 Subject: [PATCH 6/8] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=2016?= =?UTF-8?q?=E5=88=98=E6=B0=B8=E6=BD=98/2022-10-27=E7=AC=AC=E5=85=AB?= =?UTF-8?q?=E6=AC=A1=E4=BD=9C=E4=B8=9Amap=E5=92=8Cset.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...75\234\344\270\232map\345\222\214set.html" | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100644 "16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set.html" diff --git "a/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set.html" "b/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set.html" deleted file mode 100644 index b89b37f..0000000 --- "a/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set.html" +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - Document - - - - - \ No newline at end of file -- Gitee From accbbac91b54229448ee144bb797f834469e3e36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B0=B8=E6=BD=98?= <1924969174@qq.com> Date: Fri, 28 Oct 2022 03:26:24 +0000 Subject: [PATCH 7/8] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=2016?= =?UTF-8?q?=E5=88=98=E6=B0=B8=E6=BD=98/2022-10-27=E7=AC=AC=E5=85=AB?= =?UTF-8?q?=E6=AC=A1=E7=AC=94=E8=AE=B0map=E5=92=8Cset.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\347\254\224\350\256\260map\345\222\214set.md" | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 "16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\347\254\224\350\256\260map\345\222\214set.md" diff --git "a/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\347\254\224\350\256\260map\345\222\214set.md" "b/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\347\254\224\350\256\260map\345\222\214set.md" deleted file mode 100644 index e48d984..0000000 --- "a/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\347\254\224\350\256\260map\345\222\214set.md" +++ /dev/null @@ -1,15 +0,0 @@ -引用型:function, array, obj, -ES6: map set -Map:键值对,类似于对象 -map.set()改 -例子:map.set(5,zoe)加入要改的值 -+0和-0虽然===是false但是还是算一个元素 -map转数组 -例子: - const arr = [...map] - const arr = [] - for(let e of map.entries()){arr.push(e)} -数组转map -例子: - const arr = [['name', 'zoe'], ['age', 18]] - var map = new Map([['name', 'zoe'], ['age', 18]]) \ No newline at end of file -- Gitee From 4b22b4ae182d7c5eeefc2175cbeeb8cac30200e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B0=B8=E6=BD=98?= <1924969174@qq.com> Date: Fri, 28 Oct 2022 03:26:40 +0000 Subject: [PATCH 8/8] =?UTF-8?q?16=E5=88=98=E6=B0=B8=E6=BD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘永潘 <1924969174@qq.com> --- ...75\234\344\270\232map\345\222\214set.html" | 22 +++++++++++++++++++ ...\254\224\350\256\260map\345\222\214set.md" | 15 +++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 "16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set.html" create mode 100644 "16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set/2022-10-27\347\254\254\345\205\253\346\254\241\347\254\224\350\256\260map\345\222\214set.md" diff --git "a/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set.html" "b/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set.html" new file mode 100644 index 0000000..b89b37f --- /dev/null +++ "b/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set.html" @@ -0,0 +1,22 @@ + + + + + + + Document + + + + + \ No newline at end of file diff --git "a/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set/2022-10-27\347\254\254\345\205\253\346\254\241\347\254\224\350\256\260map\345\222\214set.md" "b/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set/2022-10-27\347\254\254\345\205\253\346\254\241\347\254\224\350\256\260map\345\222\214set.md" new file mode 100644 index 0000000..e48d984 --- /dev/null +++ "b/16\345\210\230\346\260\270\346\275\230/2022-10-27\347\254\254\345\205\253\346\254\241\344\275\234\344\270\232map\345\222\214set/2022-10-27\347\254\254\345\205\253\346\254\241\347\254\224\350\256\260map\345\222\214set.md" @@ -0,0 +1,15 @@ +引用型:function, array, obj, +ES6: map set +Map:键值对,类似于对象 +map.set()改 +例子:map.set(5,zoe)加入要改的值 ++0和-0虽然===是false但是还是算一个元素 +map转数组 +例子: + const arr = [...map] + const arr = [] + for(let e of map.entries()){arr.push(e)} +数组转map +例子: + const arr = [['name', 'zoe'], ['age', 18]] + var map = new Map([['name', 'zoe'], ['age', 18]]) \ No newline at end of file -- Gitee