这篇翻译不完整。请帮忙从英语翻译这篇文章

假值是在 Boolean 上下文中认定可转换为false的值.

JavaScript 在需要用到布尔类型值的上下文中使用强制类型转换(Type Conversion )将值转换为布尔值,比如:在条件语句或者循环语句中

例子

 JavaScript中falsy值的例子 (将falsy值转换为false):

if (false)
if (null)
if (undefined)
if (0)
if (NaN)
if ('')
if ("")

[1] document.all has been used for browser detection in the past and the HTML specification defines a willful violation of the ECMAScript standard here to keep compatibility with legacy code (if (document.all) { // Internet Explorer code here } or using document.all without checking its presence first: document.all.foo).

Sometimes written falsey, although in English usually turning a word into an adjective with a -y, any final e is dropped (noise => noisy, ice => icy, shine => shiny)

更多

文档标签和贡献者

 此页面的贡献者: stark-jarvis, issliu, LiuL0703
 最后编辑者: stark-jarvis,