function fetchOne(params, type) {
if (params == undefined) {
params = [12, 23];//new Array(12, 23);
}
if (type == undefined) {
type = 'record';
}
alert('default: '+ params.join(', ') + ' & ' + type);
}
fetchOne();
Title:
javascript default parameters
Description:
function fetchOne(params, type) { if (params == undefined) { params = [12, 23];//new Array(12, 23); } if (type == undefined...
...
Rating:
4