const array = [1,2,3] function addElementToArray(a,element){ return [...a, element] } //invoce function addElementToArray(array,4) //[1,2,3,4]