/**
*
* @param {String} unit
* @param {Number} item
*/
function foo(name,age) {
return {name, age}
}
foo("Luke",18)
/**
*
* @param {String} ???
* @param {Number} ???
*/
function bar({name,age}) {
return {name, age}
}
bar({
age: 18
name: "Luke"
})
< hr >
the second function can be written this way without deliberately arranging the input order of the parameters, but what should I do if I want to use JsDoc comments?