Created
September 13, 2017 12:34
-
-
Save 92hackers/5d7a9c8bea5ec6f1e8acdaf159e3e785 to your computer and use it in GitHub Desktop.
compare two snippets
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 value = Number(amount) | |
this.validateFaield = !isNaN(value) ? value > balance : true | |
|| | |
|| | |
this.validateFailed = !(value <= balance) | |
// compare NaN value always return false. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment