Update toOrdinalSuffix.md

This commit is contained in:
Angelos Chalaris
2020-11-13 19:49:57 +02:00
committed by GitHub
parent 05e3f6dc07
commit c4513404c7

View File

@ -3,7 +3,7 @@ title: toOrdinalSuffix
tags: math,intermediate
---
Adds an ordinal suffix to a number.
Takes a number and returns it as a string with the correct ordinal indicator suffix.
- Use the modulo operator (`%`) to find values of single and tens digits.
- Find which ordinal pattern digits match.