引用数据类型:
数组:array
对象:object
函数:function
1: typeof 数组:object 一种特殊的对象。
//定义方法
/**
* 用来得到任意区间的随机数的。
* @param min 区间最小值,包含
* @param max 区间最大值,不包含
*/
function randomNumber(min,max) {
return parseInt(Math.random()*(max-min)+min);
}
console.log (typeof randomNumber);//function
·