var colors=['red','green','yellow'];
console.log(colors)//['red','green','yellow']
console.log(colors.toString());//red,green,yellow
console.log(colors.valueOf());//['red','green','yellow']
console.log(colors.toLocaleString());//red,green,yellow
function num(nums){
if(nums<=1){
return 1;
}
else{
return nums*num(nums-1);
}
}
console.log(nums(5));//120递归函数