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>
为什么结果会是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>