Ask HN: Anybody knows why do (0, 0, 1) evaluate to 1 in JavaScript?

by fatih-eriklion 2/14/2024, 4:53 PMwith 3 comments

I understand that in this way:

- Tuples not supported, the last item is returned, for a Python programmer perspective.

- It's a function call. Function name is not given, so the last argument is returned.

by cranberryturkeyon 2/14/2024, 5:01 PM

yes. its doing `(false, false, true)` basically. last argument is true.