Insert

List
Both Server and Client
Both Mobile and PC

Insert a new element at the specified index position in the list. The original elements at and after that index position will move one position backwards one by one

Declaration

func Insert(target List<object>, index int, value object)
go

Parameters

Input

Name Type Description
Target List Target List
Index Int The index position to be inserted, the index starts from 0
Value Object The new element value to insert