【前端面試題】經典的前端面試20題,實用、易用、好用

一、JavaScript中如何檢測一個變量是一個String類型?請寫出函數實現javascript function isString(obj){ return typeof(obj) === "string"? true: false; } 二、請用js去除字符串空格?html 方法一:使用replace正則匹配的方法 去除全部空格: str = str.replace(/\s*/g
相關文章
相關標籤/搜索