Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
...

JavaScriptual javascriptual

💭
...
View GitHub Profile
View gist:1631463af601601da94805cfe0fe0e2f
// Convert array to string
[1,2,3,"hello","there",4,5].toString(); // 1,2,3,hello,there,4,5
// Return the array itself
[1,2,3].valueOf(); // [1, 2, 3]
// Check if an object or a primitive is an Array
Array.isArray([1]); // true
Array.isArray( 1 ); // false