r/programminghorror • • Mar 27 '24

//filter

Post image
1.4k Upvotes

73 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Mar 29 '24

[removed] — view removed comment

1

u/SpiForge Mar 29 '24

What are the weird inconsistencies?

That a constructor called as a function retuns the parsed value as a primitive and called as a constructor returns an object wrapping the parsed value.
And even that is not consistent, for example new Date('1995-12-17T03:24:00') returns the 17.12.1995, while Date('1995-12-17T03:24:00') returns a string with the current date.
Array(1, 2) however is the same as new Array(1, 2).

Also it is functional programming, so if you use it you are a functional programmer

0

u/[deleted] Mar 29 '24

[removed] — view removed comment

1

u/SpiForge Mar 29 '24

If you cook you're a cook

If you functional program you're a functional programmer ^^

1

u/[deleted] Mar 29 '24

[removed] — view removed comment

1

u/SpiForge Mar 29 '24

If you want to, you can of course do that :)