Notes: 1  Gain on disposal of investments and interest income are not considered as revenue because they are not earned from the principal business activity of ABC PLC, i.e. selling stationery goods.
To assign values to the various positions in an array, you do it in the normal way: aryNums[0] = 10; Here, a value of 10 is being assigned to position 0 in the array called aryNums. Again, the square brackets are used to refer to each position.
Remove Array element by Index. First we will see an example were we will remove array element by its index. For this we can define a generic function removeByIndex() . In above code we used javascript splice() method to remove element at an index.splice() method takes two argument. First is the index at which you want to remove element and second is number of elements to be removed. In our case it is 1. To test the above code lets define a simple array and remove one of the element.Also you may want to define removeByIndex method with an array so that you call it directly. For example, in following example, we have define an array test and its method removeByIndex().o test the above code lets define a simple array and remove one of the element. Also you may want to define removeByIndex method with an array so that you call it directly. For example, in following example, we have define an array test and its method removeByIndex().