What is the output of the below code? <script type="text/javascript"> var a="SmileSmile"; var x=a.lastIndexOf("m"); document.write(x); </script>
Back to Questions6
1
7
Error
The index starts with 0 in JavaScript. Here, x searches for the last occurance of “m” in the text.
Answers Posted
PostedBy By: luffy_monkey, at 01:15 PM on 29-March-2019
Answer Posted:
Explanation: h
Result: Wrong Answer
PostedBy By: Admin, at 12:18 PM on 25-March-2019
Answer Posted:
Explanation: D
Result: Wrong Answer