Alfaiz Ali
Alfaiz Ali

@heyAlfaiz

12 Tweets Mar 16, 2023
JavaScript String 🟠
A Thread ↓
• What is a String?
→ Strings are useful for holding data that can be represented in text form.
→ Creating a string
A JavaScript string is zero or more characters written inside single or double quotes.
• String Properties
→ Some of the most-used operations on strings are to check their `length`
• String Methods
→ String methods help you to work with strings.
Some basic JavaScript methods are :
1. Trim
Remove whitespaces at the beginning and at the end
2. Split
Convert a string to an array
3. Includes
Returns true if a string contains a particular string. In other case returns false.
4. Char At
Get the character at a specific position in a string
5. Slice
Extract a part of a particular string
6. To Lower Case
Convert the string to lowercase letters
7. To Upper Case
Convert the string to uppercase letters
Some other Methods of string are :
Thanks so much for getting to the end of it! 🙏
Make sure to follow me @imAlfaiz for more such content! 😇

Loading suggestions...