Give the output of the following snippet:
Name= “Split-this-string”
Name.split(“-”)
a. [“Split”, “this”, “string”]
b. Split, this, string
c. [“Split-“, “this-“, “string”]
d. Split this string
varunrathourpcu4cz:
photo dekh lo chahe ques post kia abi maine
Answers
Answered by
5
Hi
a. [“Split”, “this”, “string”] is the correct answer.
Because separator string is used to determine from where we have to split the string, and it never gets included in result.
Please check screenshot for output.
Attachments:
Answered by
2
A IS THE R8 ANS
HOPE IT HELPS U
HOPE IT HELPS U
Similar questions