随笔分类 - TypeScript
摘要:一个接口允许存在任意的属性 interface IPerson { name: string; age: number; userBio?: string; [propName: string]: any; } let wangzz: IPerson = { name: 'wangzz', age:
阅读全文
摘要:<script> let arr = [1, 2, 3, 4, 5, 5, 4, 3, 2, 1]; // 1. 数组去重 let result = [...new Set(arr)]; console.log("result: ", result); // 2. 交集 let arr02 = [4
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi
阅读全文