Created
October 18, 2022 22:26
-
-
Save JWLangford/276408e443ab111cfd4c135afe2ab419 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 numInt = "10" | |
const convertedInt = parseFloat(numInt) | |
// 10 | |
const numFloat = "10.51" | |
const convertedFloat = parseFloat(numFloat) | |
// 10.51 | |
const notANumber = "chicken" | |
const convertedNaN = parseFloat(notANumber) | |
// NaN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment