Created
February 2, 2018 01:36
-
-
Save jcreamer898/fcd43bd4042361899e7eb7de217c40be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const formatPrice = (num: number, symbol = "$": string) => | |
`${symbol}${num.toFixed(2)}`; formatPrice("1234"); | |
// num.toFixed is not a function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment