<script>
const string = 'dream is my reality'
console.log(string.substring(6))
// index 6 부터 ~ 끝까지 가져옵니다.
// 'is my reality'
console.log(string.substring(6, 8))
// index 6 부터 ~ index 8 '직전' 까지 가져옵니다.
// 'is'
</script>
<script>
const menu = 'abcdefghijklmnopqrstuvwxyz';
const letterIndex = 5;
console.log(menu.substring(letterIndex, letterIndex + 1);
// index 5 부터 index 6 이전까지 가져옵니다.
// 'f'
</script>