//返回多个数据可以用数据的形式
function division(dividend, divisor){
var quotient = dividend / divisor;
var arr = [dividend, divisor, quotient]
return arr;
}
var res = division(100, 4)
document.write(res[0]); // 输出:100
document.write(res[1]); // 输出:4
document.write(res[2]); // 输出:25
标签:技巧,res,js,write,dividend,var,操作,document,divisor
From: https://www.cnblogs.com/Sultan-ST/p/16645280.html