JavaScript String

LITON AHMED
1 min readMay 5, 2021

--

charAt

Charat is a tall string or 2/4 Word string of upright, find out a stated ward. Or Shudu will use the Word, then you can use Charat such as:

Remember that one thing is counted here but from 0

const text = "My name is Liton Ahmed";
console.log(text.charAt(3));
outpur: n

concat

You think that you have a flower name, such as Liton Ahmed, but if these two are different, such as: “Liton” “Ahmed” here are two string here, such as Concat is used to add these two string such as:

const fristName = "Liton";
const lastName = "Ahmed";
console.log(fristName.concat('', lastName));
output: Liton, Ahmed

endsWith

Endswith If you want to find out something in the end, use Endswith and how many words have to be given such:

And if you go wrong or give the last word, then False will come.

const text = "My name is Liton"
console.log(text.endsWith("Liton", 17))
output: true

indexOf

INDEXOF is a paragraph or any other thing that is in the paragraph, how many places in the paragraph are located, such as:

const text = "My village Name of Tepurdanga, Nilphamri"
console.log(text.indexOf("Name"))

--

--

LITON AHMED
LITON AHMED

Written by LITON AHMED

0 Followers

Web Developer

No responses yet