Applying JavaScript substring: Example for Easy Learning