padStartの読み方
javascriptで利用されるメソッドの1つである「padStart」の読み方を掲載してます。
読み⽅
「パッドスタート」と読みます。
padStartとは
javascriptで、文字列の先頭に指定した長さ(文字列の合計)の文字列を追加するメソッドとなります。
const str = 'sebee';
// 7文字に合わせる
console.log(
'\"' + str.padStart(7) + '\"'
);
// 埋める文字列を指定
console.log(
str.padStart(10, "s")
);
実行結果
-
前の記事
Indeterminateの読み方 2020.12.20
-
次の記事
ternary operatorの読み方 2020.12.22