- A Extracts a part of a string
- B Replaces a part of a string with a new string
- C Concatenates two strings
- D None of these
- Share this MCQ
Answer:
A
Share this MCQ
The substring()
function extracts a part of a string and returns a new string.
It takes two arguments: the start index and the end index (optional).
The extracted part includes the characters from the start index to the end index (not including the character at the end index).
Share this MCQ