---
title: "Discussion on \"JavaScript: padStart() and padEnd()\" | Hashnode"
description: "Discussion on \"JavaScript: padStart() and padEnd()\". padStart() and padEnd() are really useful for getting your string to be a certain length. I've found more of a use for them for numbers (converted to strings).\nLet's say you have to write all numbers as two digits, even if they are 0-9. To do this we..."
url: "https://hashnode.com/posts/javascript-padstart-and-padend/5fcb72307865da78339e6032"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [JavaScript: padStart() and padEnd()](https://blog.nicm42.me.uk/javascript-padstart-and-padend?utm_source=hashnode&utm_medium=feed)

padStart() and padEnd() are really useful for getting your string to be a certain length. I've found more of a use for them for numbers (converted to strings). Let's say you have to write all numbers as two digits, even if they are 0-9. To do this we...

Dec 5, 2020 · 2 min read · blog.nicm42.me.uk  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Nic](https://hashnode.com/@nicm42)

@nicm42 · England

  
[View profile](https://hashnode.com/@nicm42)

This week I learnt...

Front End Developer. I like problem solving and making things pretty. I also like red.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
