【ECMAScript】ES6-ES11學習筆記

文章目錄

      • 注意事項
      • 1.聲明變量
      • 2.定義常量
      • 3.解構賦值
      • 4.模板字符串
      • 5.簡化對象寫法
      • 6.箭頭函數
      • 7.參數默認值
      • 8.rest參數
      • 9.擴展運算符
      • 10.Symbol
      • 11.生成器函數
      • 12.Promise基本語法
      • 13.集合set
      • 14.Map
      • 15.類class
      • 16.數值擴展
      • 17.對象私有屬性
      • 18.對象方法擴展
      • 19.js文件模塊化
      • 20.async和await
      • 21.正則擴展-正向斷言與反向斷言
      • 22.可選鏈操作符
      • 23.動態import

注意事項

代碼中的注釋有筆記如

// 1.變量不能重復聲明

有一些錯誤示范代碼,為了代碼整體可運行,將其注釋如

let star='jaychou';
// let star='jollin'
// Uncaught SyntaxError: Identifier 'star' has already been declared

當代碼有輸出是,通常將輸出放在對應代碼下一行,并注釋如下

// let star='jollin'
// Uncaught SyntaxError: Identifier 'star' has already been declaredconst TEAM = ['70KG','baisha'];
TEAM.push('MAZHE');
console.log(TEAM);
//  ['70KG', 'baisha', 'MAZHE']

1.聲明變量

<script>let a;let b,c,d;let e=100;let f=521, g='iloveyou', h=[];// 1.變量不能重復聲明let star='jaychou';// let star='jollin'// Uncaught SyntaxError: Identifier 'star' has already been declared// 2.塊級作用域,全局,函數,eval// if else while for{let girl='jollin';}// console.log(girl);// Uncaught ReferenceError: girl is not defined// 3.不存在變量提升// console.log(boy);// Uncaught ReferenceError: Cannot access 'boy' before initializationlet boy='jaychou';// 4.不影響作用域鏈{let school='xxschool';function fn(){console.log(school);}fn();}
</script>

2.定義常量

<script>// 聲明常量const SCHOOL = 'xxschool'// 1.一定要賦初始值// const A;// Uncaught SyntaxError: Missing initializer in const declaration// 2.一般常量使用大寫// 3.常量的值不能修改// SCHOOL='yyschool'// Uncaught TypeError: Assignment to constant variable.// 4.塊級作用域{const PLAYER='70KG';}// console.log(PLAYER);// Uncaught ReferenceError: PLAYER is not defined// 5.對于數組和對象的元素修改,不算做對常量的修改,不會報錯const TEAM = ['70KG','baisha'];TEAM.push('MAZHE');console.log(TEAM);//  ['70KG', 'baisha', 'MAZHE']
</script>

3.解構賦值

<script>// ES6允許按照一定模式從數組和對象中提取值,對變量進行賦值,稱為解構賦值。// 1.數組的解構const F4 = ['A1','B2','C3','D4'];let [A,B,C,D] = F4;console.log(A,B,C,D);// A1 B2 C3 D4// 2.對象的解構const zhou = {name:'jaychou',age:'40',skill: function(){console.log('我可以唱歌');}};let {name,age,skill} = zhou;console.log(name,age,skill);// jaychou 40 ? (){//         console.log('我可以唱歌');// }
</script>

4.模板字符串

<script>// ES6引入新的字符串聲明方式``// 1.聲明let str1 = `這是一個字符串`;console.log(str1);// 這是一個字符串// 2.內容中可以出現換行符let str2 = `<ul><li>A1</li><li>B2</li><li>C3</li><li>D4</li></ul>`// 3.變量拼接let star = '周杰倫';let str3 = `我最喜歡聽${star}的歌曲`console.log(str3)// 我最喜歡聽周杰倫的歌曲
</script>

5.簡化對象寫法

<script>// ES6允許在大括號里,直接寫入變量和函數,作為對象的屬性和方法let name = 'jaychou';let skill = function(){console.log('i can sing');}const star = {name,skill,age(){console.log('40');}}console.log(star);// {name: 'jaychou', skill: ?, age: ?}
</script>

6.箭頭函數

<script>// ES6允許使用箭頭(=>)定義函數// 聲明一個函數let skill=function(a,b){return a+b;}let skill2=(a,b)=>{return a+b;}// 調用函數let result = skill(1,2);let result2 = skill(2,4);console.log(result);// 3console.log(result2);// 6// 1.this是靜態的,this始終指向函數聲明時所在作用域下的this的值function getName(){console.log(this.name);}let getName2 = () => {console.log(this.name);}// 設置window對象的name屬性window.name = 'name of window';const star={name:'jaychou'}// 直接調用getName();// name of windowgetName2();// name of window// call 方法調用getName.call(star);// jaychougetName2.call(star);// name of window// 2.不能作為構造實例化對象let Person=(name,age)=>{this.name=name;this.age=age;}// let me=new Person('xiaoming','30');// Uncaught TypeError: Person is not a constructor// 3.不能使用arguments變量// let fun=()=>{//     console.log(arguments);// }// fun(1,2,3);// Uncaught ReferenceError: arguments is not defined// 4.箭頭函數的簡寫// 1).省略小括號,形參只有一個的時候let add=n=>{return n+n;}console.log(add(3))// 6// 2). 省略花括號,當代碼只有一條語句的時候,此時return必須省略,// 而且語句的執行結果就是函數的返回值let square = n => n*n;console.log(square(4))// 16// 示例:從數組中返回偶數的元素const arr=[1,6,9,100,10];const even_result = arr.filter(function(item){if (item%2===0){return true;}else{return false;}})console.log(even_result);// [6, 100, 10]const even_result2 = arr.filter(item=>item%2===0)console.log(even_result2);// [6, 100, 10]
</script>

箭頭函數適合與this無關的回調,定時器,數組的方法回調
不適合與this有關的回調,時間回調,對象的方法

7.參數默認值

<script>// ES6允許給函數的參數賦值初始值// 1.形參初始值,具有默認的參數,一般位置要靠后function add(a, b, c = 10) {return a + b + c;}let result = add(1, 2)console.log(result);// 13// 2.與解構賦值結合function connect({host = '127.0.0.1', port, username, password}) {console.log(host);console.log(port);console.log(username);console.log(password);}connect({host: 'localhost',port: '3306',username: 'username',password: 'password',})// localhost// 3306// username// password
</script>

8.rest參數

<script>// ES6引入rest參數,用于獲取函數的實參,用來代替arguments// ES5獲取實參的方式function date(){console.log(arguments);}date('girl1','girl2','girl3')// Arguments(3) ['girl1', 'girl2', 'girl3', callee: ?, Symbol(Symbol.iterator): ?]// rest參數function date2(...args){console.log(args);}date2('girl1','girl2','girl3')// (3) ['girl1', 'girl2', 'girl3']function fun(a,b,...args){console.log(a);console.log(b);console.log(args);}fun(1,2,3,4,5,6);// 1// 2// (4) [3, 4, 5, 6]
</script>

9.擴展運算符

<div></div>
<div></div>
<div></div>
<script>// 擴展運算符能將數組轉換為逗號分割的參數序列const f4=['f1','f2','f3','f4']function singer(){console.log(arguments);}singer(...f4);// Arguments(4) ['f1', 'f2', 'f3', 'f4', callee: ?, Symbol(Symbol.iterator): ?]// 應用1.數組的合并const boys=['boy1','boy2'];const girls=['girl1','girl2'];const boysAndGirls=boys.concat(girls)const boysAndGirls2=[...boys,...girls]console.log(boysAndGirls);// (4) ['boy1', 'boy2', 'girl1', 'girl2']console.log(boysAndGirls2);// (4) ['boy1', 'boy2', 'girl1', 'girl2']// 應用2.數組的克隆const fruits=['apple','banana','orange'];const fruits2 = [...fruits]console.log(fruits);// 將偽數組轉換成真正的數組const divs = document.querySelectorAll('div');const divArr = [...divs];console.log(divs);// NodeList(3) [div, div, div]console.log(divArr);// (3) [div, div, div]
</script>

10.Symbol

<script>// 創建Symbollet s=Symbol();let s2 = Symbol('abcd');let s3 = Symbol.for('ABCD');console.log(s, typeof s);// Symbol() 'symbol'console.log(s2, typeof s2);// Symbol(abcd) 'symbol'console.log(s3, typeof s3);// Symbol(ABCD) 'symbol'// 不能與其他類型數據進行運算// 數據類型巧記 USONB: YOU SO NB// U: undefined// S: String, Symbol// O: Object// N: null, Number// B: Boolean// Symbol創建對象屬性// 向對象中添加方法up downlet game = {name:'俄羅斯方塊'}let methods = {up: Symbol('up'),down: Symbol('down')};game[methods.up] = function(){console.log('我可以改變形狀');}game[methods.down] = function(){console.log('我可以快速下降');}console.log(game);// {name: '俄羅斯方塊', Symbol(up): ?, Symbol(down): ?}let game2 = {name:'狼人殺',[Symbol('say')]: function(){console.log('我可以發言');},[Symbol('zibao')]: function(){console.log('我可以自爆');},}console.log(game2)// {name: '俄羅斯方塊', Symbol(up): ?, Symbol(down): ?}
</script>

11.生成器函數

<script>// 生成器其實就是一個特殊的函數function* gen() {yield 'alpha';yield 'bob';yield 'charlie';}let iterator = gen();console.log(iterator.next());// {value: 'alpha', done: false}console.log(iterator.next());// {value: 'bob', done: false}console.log(iterator.next());// {value: 'charlie', done: false}console.log(iterator.next());// {value: undefined, done: true}// 遍歷for (let v of gen()) {console.log(v);}// alpha// bob// charlie// 生成器函數實例// 回調地獄// setTimeout(() => {//     console.log(111);//     setTimeout(() => {//         console.log(222);//         setTimeout(() => {//             console.log(333);//         },3000)//     },2000)// },1000)function one() {setTimeout(() => {console.log(111);iterator2.next();},1000)}function two() {setTimeout(() => {console.log(222);iterator2.next();},2000)}function three() {setTimeout(() => {console.log(333);iterator2.next();},3000)}function * gen2(){yield one();yield two();yield three();}let iterator2=gen2();iterator2.next();// 1秒后輸出:111// 2秒后輸出:222// 3秒后輸出:333</script>

12.Promise基本語法

<script>// 實例化 Promise 對象const p = new Promise(function(resolve,reject){setTimeout(function(){let data = '用戶數據';resolve(data);// let err='錯誤信息';// reject(err);},1000);});// 調用 Promise 對象的then方法p.then(function(value){console.log(value);},function(reason){console.error(reason);})// 1秒后輸出:用戶數據
</script>

13.集合set

<script>// set的聲明let s= new Set(['a','b','c']);let s2 = new Set(['A','B','C','D','E'])// 元素個數console.log(s2.size);// 5// 添加新元素s2.add('F');console.log(s2);// Set(6) {'A', 'B', 'C', 'D', 'E', …}// 刪除元素s2.delete('A');console.log(s2);// Set(5) {'B', 'C', 'D', 'E', 'F'}// 查詢元素console.log(s2.has('C'));// trueconsole.log(s2.has('O'));// false// 清空s2.clear();console.log(s2)// Set(0) {size: 0}// 遍歷for(let v of s){console.log(v)}// a// b// c
</script>

14.Map

<script>// 聲明Maplet m = new Map();// 添加元素m.set('name','jaychou');m.set('skill',function(){console.log('我可以唱歌!');});let key={star:'jollin'};m.set(key,['value1','value2','value3']);// sizeconsole.log(m.size)// 3// 刪除m.delete('name');// 獲取console.log(m.get('skill'));// ? (){//     console.log('我可以唱歌!');// }console.log(m.get(key));// (3) ['value1', 'value2', 'value3']// 清空m.clear();
</script>

15.類class

<script>// 構造一個類class MobilePhone{// 構造方法,名字不能修改constructor(brand,price){this.brand = brand;this.price = price;}// 方法必須使用該語法,不能使用ES5的對象完整形式call(){console.log('我可以打電話')}}let onePlus = new MobilePhone("1+",2000);console.log(onePlus);// MobilePhone {brand: '1+', price: 2000}
</script>

16.數值擴展

<script>// 0.Number.EPSILON 是JavaScript表示的最小精度function equal(a,b){if (Math.abs(a-b)<Number.EPSILON){return true;}else{return false;}}console.log(0.1+0.2===0.3);// falseconsole.log(equal(0.1+0.2,0.3));// true// 1.二進制和八進制let b=0b1010;let o=0o177;let d=200;let x=0xff;console.log(x);// 255// 2.Number.isFinite檢查一個值是否為有限數console.log(Number.isFinite(100));// trueconsole.log(Number.isFinite(100/0));// falseconsole.log(Number.isFinite(Infinity));// false// 3.Number.parseInt Number.parseFloat字符串轉整數console.log(Number.parseInt('312123123abc'));// 312123123console.log(Number.parseFloat('3.231232131dii'));// 3.231232131// 4.Number.isNaN檢查一個數值是否為NaNconsole.log(Number.isNaN(23));// false// 5.Number.isInteger 判斷是否整數// 6.Math.trunc 抹掉小數部分// 7.Math.sign 判斷一個數符號console.log(Math.sign(100));// 1console.log(Math.sign(0));// 0console.log(Math.sign(-2000));// -1
</script>

17.對象私有屬性

<script>class Person{// 公有屬性name;// 私有屬性#age;#weight;// 構造方法constructor(name,age,weight){this.name=name;this.#age=age;this.#weight=weight;}intro(){console.log(this.name);console.log(this.#age);console.log(this.#weight);}}let girl=new Person('nana','23','45');console.log(girl.name);console.log(girl.age);console.log(girl.weight);// nana// undefined// undefinedgirl.intro();// nana// 23// 45
</script>

18.對象方法擴展

<script>// 1.Object.is 兩個值是否完全相等console.log(Object.is(120, 120));// trueconsole.log(Object.is(NaN, NaN));// trueconsole.log(NaN === NaN);// false// 2.Object.assign對象的合并const config1 = {host: 'localhost',port: 3306,name: 'root',pass: 'root'};const config2 = {host: 'localhost',port: 33060,name: 'name',pass: 'pass'}console.log(Object.assign(config1, config2));// {host: 'localhost', port: 33060, name: 'name', pass: 'pass'}// 3.Object.setPrototypeOf Object.getPrototypeOf// Object.setPrototypeOf() 靜態方法可以將一個指定對象的原型// (即內部的 [[Prototype]] 屬性)設置為另一個對象或者 null。const obj = {};const parent = { foo: 'bar' };console.log(obj.foo);// undefinedObject.setPrototypeOf(obj, parent);console.log(obj.foo);// barconsole.log(Object.getPrototypeOf(obj))// {foo: 'bar'}
</script>

19.js文件模塊化

ES6模塊暴露數據,m1.js

// 分別暴露
export let star='jaychou';export function skill() {console.log('i can sing');
}// 統一暴露
let movie='Titanic';function category(){console.log('romance')
}export{movie,category};// 默認暴露
export default{music:'Scarborough Fair',singer: function(){console.log('sarah brightman');}
}

ES6引入模塊數據,html文件

<script type="module">// 1.通用導入方式import * as m1 from './m1.js';// 2.解構賦值方式import {star,skill} from './m1.js';import {movie as mv, category} from './m1.js';import {default as dft} from './m1.js';// 針對默認暴露import dft2 from './m1.js';console.log(dft2);// {music: 'Scarborough Fair', singer: ?}
</script>

20.async和await

<script>// 創建promise對象const p = new Promise((resolve, reject) => {// resolve("user data");reject('error occured');})// await要放在async函數中async function main() {try {let rst = await p;console.log(rst);} catch (e) {console.log(e);}}main();// error occured
</script>

21.正則擴展-正向斷言與反向斷言

<script>// 聲明字符串let str = 'js3232323hahaoo44gaga';// 正向斷言const reg=/\d+(?=ga)/;const rst = reg.exec(str);console.log(rst);// (1) ['44', index: 15, input: 'js3232323hahaoo44gaga', groups: undefined]// 反向斷言const reg2=/(?<=o)\d+/;const rst2=reg2.exec(str);console.log(rst2);// (1) ['44', index: 15, input: 'js3232323hahaoo44gaga', groups: undefined]
</script>

22.可選鏈操作符

<script>// ?.function main(config) {const dbHost = config && config.db && config.db.host;const dbHost2 = config?.cache?.host;console.log(dbHost);console.log(dbHost2);}main({db: {host: '192.168.1.1',username: 'dbuser',},cache: {host: '192.168.1.1',username: 'cacheuser'}})// 192.168.1.1// 192.168.1.1
</script>

23.動態import

hello.js

export function ok(){alert('nihao!');
}

m1.js

const btn = document.getElementById('btn');btn.onclick = function(){import('./hello.js').then(module=>{module.ok();})
}

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/34910.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/34910.shtml
英文地址,請注明出處:http://en.pswp.cn/news/34910.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

數據庫操作不再困難,MyBatis動態Sql標簽解析

系列文章目錄 MyBatis緩存原理 Mybatis的CachingExecutor與二級緩存 Mybatis plugin 的使用及原理 MyBatis四大組件Executor、StatementHandler、ParameterHandler、ResultSetHandler 詳解 MyBatisSpringboot 啟動到SQL執行全流程 數據庫操作不再困難&#xff0c;MyBatis動態S…

Neo4j之MATCH基礎

1】基本匹配和返回&#xff1a;查找所有節點和關系&#xff0c;返回節點的標簽和屬性。 MATCH (n) RETURN n;2】條件篩選&#xff1a;查找所有名為 "Alice" 的人物節點。 MATCH (person:Person {name: Alice}) RETURN person;3】關系查詢&#xff1a;查找所有和 &q…

Centos7.6 安裝mysql過程全記錄

在centos 7.6上 離線安裝mysql 的步驟&#xff0c;可參考下文&#xff1a; 一、查看當前MySQL的安裝情況并卸載 1. 查看當前MySQL的安裝情況 查找之前是否安裝了MySQL rpm -qa|grep -i mysql 2.卸載mysql 如果已經安裝mysql&#xff0c;則需要先停止MySQL&#xff0c;再刪除…

YOLOv5、YOLOv8改進:MobileViT:輕量通用且適合移動端的視覺Transformer

MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer 論文&#xff1a;https://arxiv.org/abs/2110.02178 1簡介 MobileviT是一個用于移動設備的輕量級通用可視化Transformer&#xff0c;據作者介紹&#xff0c;這是第一次基于輕量級CNN網絡性…

LeetCode150道面試經典題--單詞規律(簡單)

1.題目 給定一種規律 pattern 和一個字符串 s &#xff0c;判斷 s 是否遵循相同的規律。 這里的 遵循 指完全匹配&#xff0c;例如&#xff0c; pattern 里的每個字母和字符串 s 中的每個非空單詞之間存在著雙向連接的對應規律。 2.示例 pattern"abba" s "c…

SpingBoot-Vue前后端——實現CRUD

目錄??????? 一、實例需求 ? 二、代碼實現 &#x1f3cc; 數據庫 &#x1f440; 后端實現 &#x1f4eb; 前端實現 &#x1f331; 三、源碼下載 &#x1f44b; 一、實例需求 ? 實現一個簡單的CRUD&#xff0c;包含前后端交互。 二、代碼實現 &#x1f3cc; 數…

[樹莓派]ImportError: libcblas.so.3: cannot open shared object file

嘗試在樹莓派4b安裝opencv-python,出現以下錯誤,ImportError: libcblas.so.3: cannot open shared object file: No such file or directory 解決方法&#xff0c;安裝依賴 sudo apt install libatlas-base-dev 再次import cv2就不會報這個錯誤。

約束綜合中的邏輯互斥時鐘(Logically Exclusive Clocks)

注&#xff1a;本文翻譯自Constraining Logically Exclusive Clocks in Synthesis 邏輯互斥時鐘的定義 邏輯互斥時鐘是指設計中活躍&#xff08;activate&#xff09;但不彼此影響的時鐘。常見的情況是&#xff0c;兩個時鐘作為一個多路選擇器的輸入&#xff0c;并根據sel信號…

八、解析應用程序——分析應用程序(1)

文章目錄 一、確定用戶輸入入口點1.1 URL文件路徑1.2 請求參數1.3 HTTP消息頭1.4 帶外通道 二、確定服務端技術2.1 提取版本信息2.2 HTTP指紋識別2.3 文件拓展名2.4 目錄名稱2.5 會話令牌2.6 第三方代碼組件 小結 枚舉盡可能多的應用程序內容只是解析過程的一個方面。分析應用程…

小龜帶你敲排序之冒泡排序

冒泡排序 一. 定義二.題目三. 思路分析&#xff08;圖文結合&#xff09;四. 代碼演示 一. 定義 冒泡排序&#xff08;Bubble Sort&#xff0c;臺灣譯為&#xff1a;泡沫排序或氣泡排序&#xff09;是一種簡單的排序算法。它重復地走訪過要排序的數列&#xff0c;一次比較兩個元…

【深度學習】再談向量化

前言 向量化是一種思想&#xff0c;不僅體現在可以將任意實體用向量來表示&#xff0c;更為突出的表現了人工智能的發展脈絡。向量的演進過程其實都是人工智能向前發展的時代縮影。 1.為什么人工智能需要向量化 電腦如何理解一門語言&#xff1f;電腦的底層是二進制也就是0和1&…

Arduino+esp32學習筆記

學習目標&#xff1a; 使用Arduino配置好藍牙或者wifi模塊 學習使用python配置好藍牙或者wifi模塊 學習內容&#xff08;筆記&#xff09;&#xff1a; 一、 Arduino語法基礎 Arduino語法是基于C的語法,C又是c基礎上增加了面向對象思想等進階語言。那就只記錄沒見過的。 單多…

全國各城市-貨物進出口總額和利用外資-外商直接投資額實際使用額(1999-2020年)

最新數據顯示&#xff0c;全國各城市外商直接投資額實際使用額在過去一年中呈現了穩步增長的趨勢。這一數據為研究者提供了對中國外商投資活動的全面了解&#xff0c;并對未來投資趨勢和政策制定提供了重要參考。 首先&#xff0c;這一數據反映了中國各城市作為外商投資的熱門目…

Effective Java筆記(31)利用有限制通配符來提升 API 的靈活性

參數化類型是不變的&#xff08; invariant &#xff09; 。 換句話說&#xff0c;對于任何兩個截然不同的類型 Typel 和 Type2 而言&#xff0c; List<Type1 &#xff1e;既不是 List<Type 2 &#xff1e; 的子類型&#xff0c;也不是它的超類型 。雖然 L ist<String…

Oracle自定義函數生成MySQL表結構的DDL語句

1. 自定義函數fnc_table_to_mysql create or replace function fnc_table_to_mysql ( i_owner in string, i_table_name in string, i_number_default_type in string : decimal, i_auto_incretment_column_name in stri…

Linux 文件查看命令

一、cat命令 1.cat文件名&#xff0c;查看文件內容&#xff1a; 例如&#xff0c;查看main.c文件的內容&#xff1a; 2.cat < 文件名&#xff0c;往文件中寫入數據&#xff0c; Ctrld是結束輸入 例如&#xff0c;向文件a.txt中寫入數據&#xff1a; 查看剛剛寫入a.txt的…

Yolov5(一)VOC劃分數據集、VOC轉YOLO數據集

代碼使用方法注意修改一下路徑、驗證集比例、類別名稱&#xff0c;其他均不需要改動&#xff0c;自動劃分訓練集、驗證集、建好全部文件夾、一鍵自動生成Yolo格式數據集在當前目錄下&#xff0c;大家可以直接修改相應的配置文件進行訓練。 目錄 使用方法&#xff1a; 全部代碼…

解決監督學習,深度學習報錯:AttributeError: ‘xxx‘ object has no attribute ‘module‘!!!!

哈嘍小伙伴們大家好呀&#xff0c;很長時間沒有更新啦&#xff0c;最近在研究一個問題&#xff0c;就是AttributeError: xxx object has no attribute module 今天終于是解決了&#xff0c;所以來記錄分享一下&#xff1a; 我這里出現的問題是&#xff1a; 因為我的數據比較大…

SQL優化

一、插入數據 優化 1.1 普通插入&#xff08;小數據量&#xff09; 普通插入&#xff08;小數據量&#xff09;&#xff1a; 采用批量插入&#xff08;一次插入的數據不建議超過1000條&#xff09;手動提交事務主鍵順序插入 1.2 大批量數據插入 大批量插入&#xff1a;&…

Android 開發中需要了解的 Gradle 知識

作者&#xff1a;wkxjc Gradle 是一個基于 Groovy 的構建工具&#xff0c;用于構建 Android 應用程序。在 Android 開發中&#xff0c;了解 Gradle 是非常重要的&#xff0c;因為它是 Android Studio 默認的構建工具&#xff0c;可以幫助我們管理依賴項、構建應用程序、運行測試…