what is the difference between new(Date) and new Date()?
问题 In javascript, the typical way to new up an object is by doing it like this: new Date() . But you can also do this: new (Date) . What is the difference and advantages of doing it the latter way? 回答1: There is no difference. The new operator takes a function reference. Like any other operator, the operand can have parentheses. The () after a new expression with no arguments are optional. However, if you have more a complicated expression inside the parentheses, they can change precedence