Symbol#slice() : slice() is a Symbol class method which slices the symbol object and return the character value.
Syntax: Symbol.slice()
Parameter: Symbol values
Return: slices the symbol object and return the character value.
Example #1 :
Output :
Symbol a : aBcDeF
Symbol b : äöü
Symbol c : ABCDEF
Symbol a slice form : B
Symbol b slice form : ö
Symbol c slice form : D
Example #2 :
Output :
Symbol a : geeks
Symbol b : åöó
Symbol c : GEEKS
Symbol a slice form : e
Symbol b slice form : ö
Symbol c slice form : K