标签:color ber 基本 类型 new string utf-8 ring type
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script>
var s="hello";
var i=8;
// typeof 只能判断基本数据类型;
alert(typeof (s));
alert(typeof (i));
var s2=new String("hello2");
alert(typeof(s2));
alert( s2 instanceof String);
var n=new Number(2);
alert(typeof (n));
alert( n instanceof String);
</script>
</body>
</html>
标签:color ber 基本 类型 new string utf-8 ring type
原文地址:https://www.cnblogs.com/gerenboke/p/11764976.html