TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

1 点作者 fatih-erikli超过 1 年前
I understand that in this way:<p>- Tuples not supported, the last item is returned, for a Python programmer perspective.<p>- It&#x27;s a function call. Function name is not given, so the last argument is returned.

2 条评论

Someone超过 1 年前
<a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;JavaScript&#x2F;Reference&#x2F;Operators&#x2F;Comma_operator" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;JavaScript&#x2F;Refe...</a>
评论 #39372302 未加载
cranberryturkey超过 1 年前
yes. its doing `(false, false, true)` basically. last argument is true.