which means that the array will perform the actions to be performed by the following parameters starting from the second parameter, and the second parameter is 0, which means there are no elements to be taken out, so the return of splice The value is [], the third and fourth parameters are 'Message' and 'NAS', and the parameters after the second parameter are the parameters to be inserted, so the two parameters '
Message' and 'NAS' will be inserted into the array, from Starting from the position specified by the first parameter, that is to say, the two parameters 'Message' and 'NAS' will be inserted at the second position of the a array, so the current a array will become [1,2, 'Message' , 'NAS',3,4,5], the first parameter passed in in the third line is 2, which means that the array will start from the second bot dataset parameter to perform the actions to be performed by the following parameters, and the second parameter is 2, which means
Two elements are to be taken out from the second position of array a, so the return value of splice is ['Message','NAS'], and the third and fourth parameters are an array [1,2] and a number 3 respectively. , the parameters after the second parameter are the parameters to be inserted, so the two parameters [1,2] and 3 will be inserted into the array, starting from the position specified by the first parameter, that is, [1,2], The two parameters 3 will be inserted at the second position of the a array, so the final a array will become [1,2,[1,2],3,3,4,5]. Array.push(element1[, …[, elementN]])