Most common javascript string function
Pratik Lochawala
Posted on June 13, 2021
charAt
charAt method returns the character at the specified index in a string
charCodeAt
charCodeAt method returns Unicode of the character at the specified index in a string
substr
substr extracts the characters from a string, beginning at a specified start position, and through the specified number of character
substring
substring Extracts the characters from a string, between two specified indices
toLowerCase
toLowerCase converts a string to lowercase letters
toUpperCase
toUpperCase converts a string to uppercase letters
trim
trim remove white space from start and end of string
repeat
repeat returns a new string with a specified number of copies of an existing string
startsWith
startsWith method is used to check whether a string starts with a specific word or not. it returns true or false
endsWith
endsWith is used to check whether a string ends with a specific word or not. it returns true or false
Wrapping up!
Share this blog with your friends ๐ฉ๐ผโ๐คโ๐ง๐ผ and developers ๐จโ๐ป you know and let them know about these cool string functions
Your feedback and comments are very important to me. ๐
Get in touch ๐ค๐ค
Posted on June 13, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 28, 2024