JavaScript/Object.prototype.toString.call:修订间差异
来自康健生活
| 第8行: | 第8行: | ||
Object.prototype.toString.call(null); | Object.prototype.toString.call(null); | ||
Object.prototype.toString.call(undefined); | Object.prototype.toString.call(undefined); | ||
Object.prototype.toString.call(true);</syntaxhighlight>|{{consoleout|<pre> | Object.prototype.toString.call(true); | ||
Object.prototype.toString.call(function(){});</syntaxhighlight>|{{consoleout|<pre> | |||
"[object Array]" | "[object Array]" | ||
"[object Object]" | "[object Object]" | ||
| 第16行: | 第17行: | ||
"[object Undefined]" | "[object Undefined]" | ||
"[object Boolean]" | "[object Boolean]" | ||
"[object Function]" | |||
</pre>}}}} | </pre>}}}} | ||
== 判断 == | == 判断 == | ||
2020年6月23日 (二) 10:37的版本
No categories