0% found this document useful (0 votes)
382 views

JS String Methods

The document discusses 10 JavaScript string methods: trim(), toUpperCase(), toLowerCase(), charAt(), concat(), indexOf(), lastIndexOf(), slice(), replace(), and split(). For each method, it provides a brief 1-sentence description of what the method does.

Uploaded by

aiswarya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
382 views

JS String Methods

The document discusses 10 JavaScript string methods: trim(), toUpperCase(), toLowerCase(), charAt(), concat(), indexOf(), lastIndexOf(), slice(), replace(), and split(). For each method, it provides a brief 1-sentence description of what the method does.

Uploaded by

aiswarya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Saif Mujawar

@webbysaif

JavaScript String Method's

trim()

toUpperCase() toLowerCase() charAt()

concat() indexOf() lastIndexOf()

slice() replace() split()


Saif Mujawar
@webbysaif

01 trim()

trim() - removes whitespace from the beginning


and end of a strings.
Saif Mujawar
@webbysaif

02 toUpperCase()

toUpperCase() - converts a string to all


uppercase letters.
Saif Mujawar
@webbysaif

03 toLowerCase()

toLowerCase() - converts a string to all


lowercase letters.
Saif Mujawar
@webbysaif

04 charAt()

charAt() - returns the character at a specific


index in a string.
Saif Mujawar
@webbysaif

05 concat()

concat() - concatenates two or more strings.


Saif Mujawar
@webbysaif

06 indexOf()

indexOf() - returns the index of the first


occurrence of a specified substring in a string.
Saif Mujawar
@webbysaif

07 lastIndexOf()

lastIndexOf() - returns the index of the last


occurrence of a specified substring in a string.
Saif Mujawar
@webbysaif

08 slice()

slice() - extracts a section of a string and


returns it as a new string.
Saif Mujawar
@webbysaif

09 replace()

replace() - replaces a specified substring with


another substring.
Saif Mujawar
@webbysaif

10 split()

split() - splits a string into an array of


substrings based on a specified delimiter.
Turn on notifications

And That's it!!!


Did you find it

useful?

Saif Mujawar
@webbysaif

Follow for more!!

You might also like