<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
// 字面量创建数组
var ageArr = [12,13,14]
var numeArr = ["xiaoming","pingguo","bob"]
var obj1 = {
name:"xiaoming",
age:100
}
var obj2 = {
name:"xiaoming2",
age:200
}
var studentArr = [obj1,obj2];
console.log(ageArr)
var arr1 = new Array(12,14,15,16)
console.log(arr1)
// 创建10个格子
var arr2 = new Array(10)
</script>
</body>
</html>
标签:obj1,xiaoming,console,14,--,JavaScript,数据类型,var,new
From: https://blog.csdn.net/weixin_58694594/article/details/142318815