timpana.blogg.se

Slice js string
Slice js string









String.slice(start, end) are the parameters of Slice method.

slice js string

NOTE: Positive parameters extracts from 'Start' to 'End' and negative parameters extract from 'End' to 'Start'. In slice method first character has the position '0', second character has position '1' like and so on. It has two parameters ' Start' & ' End', in this ' Start' is the required paramater which represents the extraction satrting position and ' End' is the optional parameter which represents the end position of the extraction.

slice js string

Slice is nothing but Segment or Division or Part, slice is consider as the one of the method in split string, the slice metod extracts the parts of string and returns the extracted parts in a new string.











Slice js string