console.log("----", document.domain);
console.log("====", Math.sqrt);
console.log("**************************");
//javaScript中Array数组的map()函数
//参考网页https://www.runoob.com/jsref/jsref-map.html
var numbers = [4, 9, 16, 25];
function myFun(currentValue, index, arr){
console.log("***", this, currentValue, index, arr);
return currentValue * 10;
}
//map()函数传递1个参数
var myResult2 = numbers.map(myFun);
console.log(myResult2);
console.log("**************************");
var hometown = "江西赣州于都县";
//map()函数传递2个参数
var myResult = numbers.map(myFun, hometown);
console.log(myResult);
console.log("**************************");
运行结果如下: