When does *not* using new work on built-ins? [duplicate]
问题 This question already has answers here : What's the difference between Array(1) and new Array(1) in JavaScript? (3 answers) What is the 'new' keyword in JavaScript? (14 answers) Closed 5 years ago . Playing with built-in JavaScript objects and constructors, I noticed something a little odd. Sometimes, it's possible to get new objects by calling a constructor without new . For example: > new Array(1,2,3,4) [1, 2, 3, 4] > Array(1,2,3,4) [1, 2, 3, 4] But sometimes this doesn't work: > Date()