function defined, along with explanations from MDN regarding array.splice() return value