求教这种JS声明是声明意思?
var aa= {},
bb= [{name: 'aa1'},{name: 'aa2'}];
代码以上。
PHP中文网2017-05-19 10:26:04
等价于
var aa = {};
var bb = [{name: 'aa1'},{name: 'aa2'}];
等价于
var aa;
var bb;
aa = {};
bb = [{name: 'aa1'},{name: 'aa2'}];
给 aa 初始化为一个空对象,给 bb 初始化为一个数组,含有两个对象