What is the difference between new functionName() and new functionName in JavaScript?
Asked
Active
Viewed 32 times
0
meskobalazs
- 15,136
- 2
- 35
- 58
Shanky
- 317
- 2
- 6
- 16
-
2None, brackets are optional if there are no arguments. – gurvinder372 Jul 14 '16 at 11:33
-
@gurvinder372 Is there not any difference at any use case? – Shanky Jul 14 '16 at 11:33
-
1*"if there are no arguments"* – meskobalazs Jul 14 '16 at 11:35
-
@meskobalazs i got that. just wanted to confirm no other meaning present for that piece of code – Shanky Jul 14 '16 at 11:37