第一個參數傳入要分割字串的依據,第二個參數為Optional,可傳入分割的最大次數。 const str = 'JavaScript is weird!' console.log(str.split(' ',2)) ...
確定! 回上一頁