一面
- 性能監控
- vue
- 如何檢測資料型別
/**
* 識別某變數為對應型別,包含全部型別
* @param {*} target - 待識別的變數
* @param {String} type - 被判斷的型別,全小寫字符
* @returns {boolean} 是否為被判斷的型別
*/
function isType(target, type){}
// 示例
let a = '111';
isType(a, 'string') 回傳值為true
isType(a, 'number') 回傳值為false
二面
- 合并陣列[4,1,3,9,6,2]和[8,5,3,2,1,4,7],然后去重,取出所有偶數并從大到小輸出
- 1234567890轉為¥1,234,567,890
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/230325.html
標籤:其他
