slice vs substring method | String Object In JavaScript

Опубликовано: 31 Июль 2022
на канале: Code Explained
14,481
488

🎁 Join my channel to get access to perks:
   / @codeexplained  

🧡 Hello All JavaScript Lovers Outhere!

Today you're going to learn about the String Object In JavaScript.

This tutorial is a series of videos, in each video we will discuss a method (or more) of the String Object in JavaScript.

In today's video, you're going to learn about two string methods, slice and substring, and know the difference between them.

Both slice and substring extract a section of a string and return it as a new string, without modifying the original string.

Syntax:
slice(indexStart)
slice(indexStart, indexEnd)

substring(indexStart)
substring(indexStart, indexEnd)

indexStart is : The index of the first character to include in the returned substring.
indexEnd is : The index of the first character to exclude from the returned substring.

🌍 Social Media Links.
◾ Facebook :   / code.explained.official  
◾ Twitter :   / code_explained  
◾ Instagram :   / code.explained.official  
◾ GitHub : https://github.com/CodeExplainedRepo

💲 Suppport the Channel
Paypal : https://paypal.me/CodeExplained
Buy Me a Coffee: https://www.buymeacoffee.com/CodeExpl...


На этой странице сайта вы можете посмотреть видео онлайн slice vs substring method | String Object In JavaScript длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Code Explained 31 Июль 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 14,481 раз и оно понравилось 488 зрителям. Приятного просмотра!