{"comment":{"url":"https://api.github.com/repos/arangodb/arangodb/comments/17469154","html_url":"https://github.com/arangodb/arangodb/commit/cea2419ba235d72db2e61846195f56c174be3a0a#commitcomment-17469154","id":17469154,"user":{"login":"jsteemann","id":1423118,"avatar_url":"https://avatars.githubusercontent.com/u/1423118?v=3","gravatar_id":"","url":"https://api.github.com/users/jsteemann","html_url":"https://github.com/jsteemann","followers_url":"https://api.github.com/users/jsteemann/followers","following_url":"https://api.github.com/users/jsteemann/following{/other_user}","gists_url":"https://api.github.com/users/jsteemann/gists{/gist_id}","starred_url":"https://api.github.com/users/jsteemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsteemann/subscriptions","organizations_url":"https://api.github.com/users/jsteemann/orgs","repos_url":"https://api.github.com/users/jsteemann/repos","events_url":"https://api.github.com/users/jsteemann/events{/privacy}","received_events_url":"https://api.github.com/users/jsteemann/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"cea2419ba235d72db2e61846195f56c174be3a0a","created_at":"2016-05-13T16:04:37Z","updated_at":"2016-05-13T16:04:37Z","body":"`typeof` is kind of special in JavaScript: \r\nit can be used like a normal function (e.g. `typeof([])`) but it is also a language construct that can be used like this: `typeof []`. `typeof` is also a keyword in JavaScript, but not in AQL.\r\nSo there are some differences between the two, and the deviating name for the AQL version was intentionally chosen so it's clear that AQL's `typename` is *not* the same as `typeof` in JS.\r\n\r\nApart from that, the return values are also different. Compare the following `typeof` results from JS with the `typename` version from AQL:\r\n\r\n> typeof null\r\nobject\r\n> typename(null)\r\nnull\r\n\r\n> typeof []\r\nobject\r\n> typename([])\r\narray"}}