Most Frequently Used String Methods in Real Time Projects 1696233506
Most Frequently Used String Methods in Real Time Projects 1696233506
•
a Y~ c r1
8 STRING METHODS
@thecodecrumbs
www,codecrumbs.com Swipe
( 0 JavaScript)
Length
The length property returns the number of characters in a
string including whitespace.
@thecodecrumbs
www,codecrumbs.com 01
( 0 JavaScript)
Slice
slice() extracts a part of a string and returns the extracted
part in a new string
@thecodecrumbs
www,codecrumbs.com 02
( () JavaScrip0
Replace
The replace() method replaces a specified value with another
value in a string
@thecodecrumbs
www,codecrumbs.com 03
( 0 JavaScript)
@thecodecrumbs
www,codecrumbs.com 04
( 0 JavaScrip0
Contact
concat() joins two or more strings
@thecodecrumbs
www,codecrumbs.com 05
( 0 JavaScript)
•
Trim
The trim() method removes whitespace from both sides of a
string
@thecodecrumbs
www,codecrumbs.com 06
( 0 JavaScript)
Char At
The charAt() method returns the character at a specified
index (position) in a string:
@thecodecrumbs
www,codecrumbs.com 07
( () JavaScript)
Split
The split() method converts a string into an array
@thecodecrumbs
www,codecrumbs.com 08
Add to Favourites
How m any do
yoM know ?
@thecodecrumbs
www.codecrumbs.com