.length / .toUpperCase()
Length and case conversion.
Syntax
text.length // text.toUpperCase()
Description
length gives the number of characters. toUpperCase converts to uppercase, toLowerCase converts to lowercase (returns new text, original remains unchanged).
Example
Loading editor…
Expected output
10 HEXLIBRARY hexlibrary
When to use?
Input validation, case-insensitive comparison.