咏竹莉
where there is a will,there is a way
摘要: padStart() 标准内置对象: String.Prototype.padStart() ES2017引入了字符串补全长度的功能,如果某个字符串不够指定长度,会在头部或尾部补全。padStart() 用于头部补全,padEnd() 用于尾部补全。 str.padStart(2, 0) // 够两 阅读全文
posted @ 2023-03-23 17:20 咏竹莉 阅读(158) 评论(0) 推荐(0) 编辑