首页
沸点
课程
数据标注
HOT
AI Coding
更多
直播
活动
APP
插件
直播
活动
APP
插件
搜索历史
清空
创作者中心
写文章
发沸点
写笔记
写代码
草稿箱
创作灵感
查看更多
登录
注册
你眼中的光
掘友等级
码农
|
奥利奥夹心家里屯大学
梦里啥都有,鞭策自己,不如鞭策世界
获得徽章 0
动态
文章
专栏
沸点
收藏集
关注
作品
赞
81
文章 52
沸点 29
赞
81
返回
|
搜索文章
最新
热门
可选链操作符
可选链操作符?. const dbHost=config?.db?.host; console.log(dbHost);
matchAll
matchAll 正则批量匹配的结果 const reg=/<li>.*?<a>(.*?)<\/a>.*?<p>(.*?)<\/p>/sg const result=str.matchAll(reg
allSettled和all
allSettled 返回成功状态的promise对象,值为每个promise参数的promise结果的数组 all 返回状态由每个promise参数的状态决定,有一个为失败的状态,状态就为失败,值为
es11私有属性
``` class person{ 共有属性 name; 私有属性 #age; #weight; constructor(name,age,weight){ this.name=name; this.
ES10数组扩展
flat(下降深度) 多维数组转化为低维数组 flatMap 将返回结果变为一维数组 arr.flat(1) arr.flatMap
trimStart和trimEnd
trimStart 清除字符串头部空白 trimEnd 清除字符串尾部空白 let str=' iloveyou ';
object.fromEntries
object.fromEntries 二维数组转换为对象 object.entries是逆运算 对象转换为二维数组
正则dotAll扩展
``` let str=` 肖生克的救赎 上映时间:1994-09-10 阿甘正传 上映时间:1994-07-06 ` const reg=/ .*?(.*?)<\/a>.*? (.*?)<\/p>/
正则断言扩展
正向断言 反向断言 const reg=/\d+(?=啦)/; const reg=/(?<=么)\d+/;
正则命名捕获分组扩展
``` let str='连接'; const reg=/(.*)<\/a>/; const result=reg.exec(str); console.log(result[1]); console
下一页
个人成就
文章被点赞
17
文章被阅读
39,642
掘力值
1,645
关注了
313
关注者
22
收藏集
2
关注标签
0
加入于
2022-04-04