弱类型语言的布尔值转换

  In some languages (e.g. C), the boolean values are defined as actual numerical values, so they are just different names for

1 and 0 (or -1 and 0).

  In some other languages (e.g.  Java),treats boolean as a completely separate data type which has 2 distinct values: true and false.

The values 1 and 0 are of type int and are not implicitly convertible to boolean.

  Javascript falls in the category that has a distinct boolean type, but on the other hand Javascript is quite keen to convert values

between different data types.

弱类型语言的布尔值转换

上一篇:Android系统架构图


下一篇:微信公众号开发将war包导入新浪sae出现错误