Description: Illustrates the JavaScript syntax for the String Slice .
Syntax: string.slice(beginIndex,endIndex) – Extracts a part of a string and returns a "slice" of the original string – endIndex is optional.