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
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
