js原生超好用的数组分类方法Object.groupBy() 这是个新方法,版本高的浏览器才能用 12345678910111213141516171819202122232425262728<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <meta name="viewport" content= javascript #js #javascript
js原生深拷贝方法:structuredClone() 告别自写时代 自2022年3月起,该功能适用于最新的设备和浏览器版本。此功能可能无法在较旧的设备或浏览器中工作。 例子12345678910// Create an object with a value and a circular reference to itself.const original = { name: "MDN" };original.itse javascript #js #javascript
js反转数组 函数: array.reverse() 示例: 12var array = ["1","23","143","42","34","1","23","12"];console.log(array.reverse()); javascript #js #javascript
js操作css变量(属性) 1234567891011121314151617181920212223242526272829303132<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width javascript #js #javascript
js数组 数据量大进行切片重组 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>数组切片< javascript #js #javascript #数组切片
js柯里化函数 12345678910111213141516171819202122232425262728<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Document</title></head> javascript #js #javascript
js的三种for循环:(for)、(for in)、(for of) for 循环通用循环 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354<!DOCTYPE html><html><head> <meta charset="utf-8"></h javascript #js #javascript
web Worker前端多线程任务执行 https://developer.mozilla.org/zh-CN/docs/Web/API/Worker 就是单独去执行一个任务,不影响主线程的任何操作 实现过程目录结构 主线程1234567891011121314151617181920212223242526272829303132333435363738<!DOCTYPE html><html lang=&quo javascript #js #javascript #web Worker
js循环中break关键字和continue关键字 break:间断循环 123456for(let i=0; i<10; i++){ if(i==5){ break; }; console.log(i);}; continue跳过什么继续循环 123456for(let i=0; i<10; i++){ if(i==5){ continue; }; javascript #js #javascript
web调用系统通知 Notification的使用 案例:123456789101112131415161718192021<!DOCTYPE html><html lang="zh-cn"><head> <meta charset="utf-8"> <title>Notification</title> <meta name javascript #js #javascript #Notification