Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

how to get last element of array in typescript

var items: String[] = ["tom", "jeff", "sam"];

alert(items[items.length-1])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #element #array #typescript
ADD COMMENT
Topic
Name
3+5 =