"How are you?".slice(8, 11); /*Output: you*/
<script> // JavaScript Program to illustrate split() function function func() { //Original string var str = 'Geeks for Geeks' var array = str.split("for"); document.write(array); } func(); </script>