Hacker News new | ask | show | jobs
Ask HN: Anybody knows why do (0, 0, 1) evaluate to 1 in JavaScript?
1 points by fatih-erikli 856 days ago
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.

2 comments

Thanks for the link.
yes. its doing `(false, false, true)` basically. last argument is true.