sanjar-notes / web_dev_fundamentals

The basics - HTML, CSS, Javascript and more
https://sanjar-notes.github.io/web_dev_fundamentals/
3 stars 0 forks source link

padStart & padEnd take total length #86

Open ahmarcode opened 1 year ago

ahmarcode commented 1 year ago

https://github.com/sanjar-notes/web_dev_fundamentals/blob/77827735603c754e7526e27bdc8b29a45934a86b/vault/3_JavaScript/3_Advanced_JS/8_ES8.md?plain=1#L7C11-L7C11

'hello'.padStart(2, 'a') // output:  'hello' no change. Current notes, change this.
'hello'.padStart(9, 'a') // output: 'aaaahello'