{"action":"created","issue":{"url":"https://api.github.com/repos/brianleroux/wtfjs/issues/135","labels_url":"https://api.github.com/repos/brianleroux/wtfjs/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/brianleroux/wtfjs/issues/135/comments","events_url":"https://api.github.com/repos/brianleroux/wtfjs/issues/135/events","html_url":"https://github.com/brianleroux/wtfjs/issues/135","id":116974417,"number":135,"title":"new Number()","user":{"login":"timdream","id":93093,"avatar_url":"https://avatars.githubusercontent.com/u/93093?v=3","gravatar_id":"","url":"https://api.github.com/users/timdream","html_url":"https://github.com/timdream","followers_url":"https://api.github.com/users/timdream/followers","following_url":"https://api.github.com/users/timdream/following{/other_user}","gists_url":"https://api.github.com/users/timdream/gists{/gist_id}","starred_url":"https://api.github.com/users/timdream/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timdream/subscriptions","organizations_url":"https://api.github.com/users/timdream/orgs","repos_url":"https://api.github.com/users/timdream/repos","events_url":"https://api.github.com/users/timdream/events{/privacy}","received_events_url":"https://api.github.com/users/timdream/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-15T05:31:09Z","updated_at":"2015-12-08T18:18:13Z","closed_at":null,"body":"```javascript\r\nvar x = 12;\r\nvar y = 12;\r\nx === y // true\r\n\r\nvar x = new Number(12);\r\nvar y = new Number(12);\r\nx === y // false\r\nx == y // false\r\n\r\nvar x = y = new Number(12);\r\nx === y // true\r\n```\r\n\r\nWhile it *might* be useful to set two variables as references to the same `Number` instance object, the object instance does not have any method available to mutate it's internal primitive value, so this feature ended up only useful in confusing people.\r\n\r\nProbably something inherited from Java?\r\n"},"comment":{"url":"https://api.github.com/repos/brianleroux/wtfjs/issues/comments/162967434","html_url":"https://github.com/brianleroux/wtfjs/issues/135#issuecomment-162967434","issue_url":"https://api.github.com/repos/brianleroux/wtfjs/issues/135","id":162967434,"user":{"login":"frontenddeveloping","id":2063415,"avatar_url":"https://avatars.githubusercontent.com/u/2063415?v=3","gravatar_id":"","url":"https://api.github.com/users/frontenddeveloping","html_url":"https://github.com/frontenddeveloping","followers_url":"https://api.github.com/users/frontenddeveloping/followers","following_url":"https://api.github.com/users/frontenddeveloping/following{/other_user}","gists_url":"https://api.github.com/users/frontenddeveloping/gists{/gist_id}","starred_url":"https://api.github.com/users/frontenddeveloping/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frontenddeveloping/subscriptions","organizations_url":"https://api.github.com/users/frontenddeveloping/orgs","repos_url":"https://api.github.com/users/frontenddeveloping/repos","events_url":"https://api.github.com/users/frontenddeveloping/events{/privacy}","received_events_url":"https://api.github.com/users/frontenddeveloping/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T18:18:13Z","updated_at":"2015-12-08T18:18:13Z","body":"This is right behavior. Nothing special or wtf here.\r\n```\r\nnew Number(12).valueOf() === new Number(12).valueOf();// true\r\n```"}}