<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>变量</title>
<script type="text/javascript">
var mynum;
mynum="8";
</script>
</head>
<body>
<script type="text/javascript">
document.write("mynum");
</script>
</body>
</html>
mynum=8;
document.write(mynum);
"8"是赋值为字符串8,
8则是赋值为数字8.
虽然在打印时候显示在终端上的效果是一样的,
但其实他们的数据类型是不同的