startsWIth and endsWith methods | String Object In JavaScript

Опубликовано: 03 Август 2022
на канале: Code Explained
6,150
104

🎁 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 startsWith and endsWith methods.

The startsWith and endsWith methods both return a Boolean true or false, based on whether a string starts (ends) with another string or not.

🟢🟠 The string.startsWith() method
🔷 Syntax:
startsWith(searchString)
startsWith(searchString, position)
🔹searchString : The characters to be searched for at the start of this string.
🔹 position (Optional) : The position in this string at which to begin searching for searchString. Defaults to 0.

🟢🟠 The string.endsWith() method
🔷 Syntax:
endsWith(searchString)
endsWith(searchString, length)
🔹searchString : The characters to be searched for at the start of this string.
🔹 length (Optional) : If provided, it is used as the length of str. Defaults to str.length.

🌍 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...


На этой странице сайта вы можете посмотреть видео онлайн startsWIth and endsWith methods | String Object In JavaScript длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Code Explained 03 Август 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 6,150 раз и оно понравилось 104 зрителям. Приятного просмотра!