Skip to main content
You Might Not Need MDN
🌜
🌞
You Might Not Need MDN
Menu
介紹
基本語法
變數宣告 var/let/const
條件判斷 if else
條件判斷 switch case
條件判斷 ternary
迴圈 for loop
迴圈 while loop
迴圈 for in 與 for of
函式 function
ES6 以上語法
模板字串 template literal
String 字串相關函式
獲得字元碼 charCodeAt
判斷開頭結尾 startsWith, endsWith
尋找字串 includes, indexOf
獲得子字串 slice
切割字串 split
Array 陣列相關函式
串接陣列 concat
判斷陣列是否完全/部分符合條件 every/some
篩選陣列 filter
遍歷陣列 forEach
尋找元素 includes/indexOf/findIndex/find
轉換陣列 map
reduce
排序陣列 sort
slice 與 splice
操控陣列元素 push/pop/shift/unshift
Object 物件相關函式
凍結物件 freeze
遍歷物件 keys, values 跟 entries
reduce
基本使用
#
Edit this page
Previous
« 轉換陣列 map
Next
排序陣列 sort »
基本使用