小编gle*_*n3b的帖子

为什么`isFinite(null)=== true`?

以下是对我有意义的例子.

isFinite(5) // true - makes sense to me, it is a number and it is finite
  typeof 5 // "number"
isFinite(Infinity) // false - makes sense for logical reasons
  typeof Infinity // "number"
isFinite(document) // false - makes sense as well, it's not even a number
  typeof document // "object"
Run Code Online (Sandbox Code Playgroud)

以下是我感到困惑的地方.

isFinite(null) // true - Wait what? Other non-number objects returned false. I see no reason?
  typeof null // "object"
Run Code Online (Sandbox Code Playgroud)

我只是没有看到这背后的原因.我想要的是最低级的答案.我认为null正在转换为0,为什么?这有什么其他影响?

javascript null

33
推荐指数
4
解决办法
3803
查看次数

如何为Android编译GCC?

有没有办法为Android编译GCC?基本上,可以在Android终端模拟器中访问GCC编译器,并能够编译将在C或C++源文件的android上运行的二进制文件.

我的意图是使用它并最终安装make.

compiler-construction android gcc makefile cross-compiling

22
推荐指数
1
解决办法
5万
查看次数