Created
August 30, 2018 13:24
-
-
Save IsTheJack/641b85fa2d5247314795fbbc81b676d4 to your computer and use it in GitHub Desktop.
Dado o construtor booleano. Quais o resultados esperados nas linhas 6, 7 e 8? Você conhece outras formas de fazer coerção de tipo em JS?
This file contains hidden or 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
// Boolean type coercion | |
Boolean(0) // false | |
Boolean(1) // true | |
Boolean(undefined) // ? | |
Boolean(' ') // ? | |
Boolean([]) // ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment