Skip to content

Instantly share code, notes, and snippets.

@13protons
Created August 5, 2015 15:58
Show Gist options
  • Save 13protons/8deded5c97d0d6194338 to your computer and use it in GitHub Desktop.
Save 13protons/8deded5c97d0d6194338 to your computer and use it in GitHub Desktop.
Node will not admit to knowing about arrays
> typeof([])
'object'
> typeof({a:[]}.a)
'object'
> []
[]
> typeof(['hi'])
'object'
> var hello = ['hi']
undefined
> hello
[ 'hi' ]
> typeof(hello)
'object'
> hello2 = new Array()
[]
> hello2.push('hi')
1
> hello2
[ 'hi' ]
> typeof(hello2)
'object'
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment