Give the output of the following string methods. "MISSISSIPPI".indexOf('s') + "MISSISSIPPI".lastIndexOf('I')
Advertisements
प्रश्न
Give the output of the following string methods.
"MISSISSIPPI".indexOf('S') + "MISSISSIPPI".lastIndexOf('I')
पर्याय
10
12
20
11
MCQ
Advertisements
उत्तर
12
Explanation:
"MISSISSIPPI" .indexOf('S') returns 2, the first index of 'S' + "MISSISSIPPI".lastlndexOf('I') returns 10, the last index of 'I' = 12
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
