instanceof,typeof

 

为什么结果会是false呢?

1 <script type="text/javascript">
2 var aColors = ["red", "green", "blue"];
3 alert(typeof aColors[0]); //output "string"
4   alert(aColors[0] instanceof String); //output "false";
5   </script>

 

 

 

 

 

posted @ 2010-03-24 10:59  ued  阅读(748)  评论(3编辑  收藏  举报