News

The slice() method extracts a substring and returns a new string. The syntax for slice() method is string.slice( firstindex [, endindex] ); firstindex : -The zero-based index at which to begin ...
The slice() method of {{jsxref("String")}} values extracts a section of this string and returns it as a new string, without modifying the original string.
If beginSliceIndex is a negative number, .slice() counts backwards from the end of the string to determine where to begin the slice. Optional. The zero-based index where the slice should end. If ...