For the complete documentation index, see llms.txt. This page is also available as Markdown.

number.padEnd

⚠️ Not a number method. .padEnd() works only on strings. See strings/.padend.md.

Description

Converts the number to a string and pads on the right with val until the result reaches num characters.

Parameters

  • val - padding string.

  • num - total desired length.

Usage

log 123.padEnd("0",5) // "12300"

Last updated