Last active
October 19, 2016 00:21
-
-
Save gabsprates/90c243fa2b6afabb5dd48caadd31bade to your computer and use it in GitHub Desktop.
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
// The `join()` of an empty Array | |
// always will be an empty string | |
var foo = new Array() // [] | |
foo.join() // “” | |
foo.toString() // “” | |
// If the Array have elements, | |
// we have an cool string. | |
var bar = [ 1, 2, 3, 4, 5 ] | |
bar.join() // “1,2,3,4,5” | |
bar.toString() // “1,2,3,4,5” |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment