padEnd和padStart接受相同的參數。 1. maxLength. 最終字符串的長度。 const result = string.padStart(5); result.length; // 5.
確定! 回上一頁