en.javascript.info/1-js/04-object-basics
Samuel Braun 1b87b89f2b
Omitting parentheses after new
Parentheses can be omitted even if the constructor function has arguments:
```js
new function(test) {
    return { test }
}

// Works the same as
new (function(test) {
    return { test }
})();
```
2022-09-25 14:59:06 +02:00
..
01-object closes #3019 2022-06-19 17:39:36 +03:00
02-object-copy closes #3129 2022-08-27 22:22:01 +03:00
03-garbage-collection Merge pull request #3021 from joaquinelio/patch-13 2022-06-13 20:08:44 +02:00
04-object-methods just add a comma 2022-05-22 22:27:11 +09:00
06-constructor-new Omitting parentheses after new 2022-09-25 14:59:06 +02:00
07-optional-chaining Merge pull request #2936 from glebmikulko/patch-4 2022-04-14 06:45:30 +03:00
08-symbol docs: add output comment in Symbols article 2022-06-27 22:44:33 +02:00
09-object-toprimitive Update conditions for choosing between toString and valueOf 2022-07-28 16:37:19 +03:00
index.md up 2017-01-07 01:25:31 +01:00