const indexIwant = (arr, val) => arr.reduce((acc, el, i) => (el === val ? [...acc, i] : acc), []);
indexIwant([1,2,3,1,2,3], 2) // 輸出[1, 4]
indexIwant([1,2,3], 4) // 輸出[]
indexIwant(arr, 想要找索引的元素)
const indexIwant = (arr, val) => arr.reduce((acc, el, i) => (el === val ? [...acc, i] : acc), []);
indexIwant([1,2,3,1,2,3], 2) // 輸出[1, 4]
indexIwant([1,2,3], 4) // 輸出[]
indexIwant(arr, 想要找索引的元素)
howler音頻插件 配置項及事件 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> <s
window對象:每一個該對象代表一個瀏覽器窗口 1.常用方法如下 open("要打開的頁面文件名","打開窗口在操作系統中的名稱(任何名稱都可以)", "toolbar=?,menubar=?,
<style type=text/css>td { font-size: 12px; color: #000000; line-heig