Javascript Slice() Function

The slice() function of string object extracts a section of a string and returns a new string. Use it for example to extracts part of specified strings.

Syntax

Javascript String Slice() Function Example