Created
October 9, 2017 13:57
-
-
Save btg5679/f0f456357ec8571f599e7d6ccbec2308 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
//Explicit vs. Implicit Coercion in JS | |
let a = 100; | |
let b = a + ''; //IMPLICIT COERCION | |
console.log(b) //'100' | |
let c = String ( a ) //EXPLICIT COERCION | |
console.log(c) //'100' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment