A function (also called a procedure, method, subroutine, or routine) is a portion of code intended to carry out a single, specific task. Use this tag for questions which specifically involve creating or calling functions. For help implementing a function to perform a task, use [algorithm] or a task-specific tag instead.
function catRecord(name, birthdate, mother) {
return {name: name, birth: birthdate, mother: mother};
}
My understanding of a constructor is a function is used to build up the object.Would this ...