関数定義
function mapObject(obj = null, mapper = function(obj){return obj}){
return mapper(obj)
};
関数呼び出し例
const x = mapObject(100, v => v * v);
console.log(x);
表示結果
10000
Go to list of users who liked
関数定義
function mapObject(obj = null, mapper = function(obj){return obj}){
return mapper(obj)
};
関数呼び出し例
const x = mapObject(100, v => v * v);
console.log(x);
表示結果
10000
Register as a new user and use Qiita more conveniently
Go to list of users who liked