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 Questions
A)

6

B)

1

C)

7

D)

Error

 

Author Explanation :

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

Back to Questions

© Copyright 1997 - 2019 | www.bestdotnettraining.com | www.deccansoft.com | All Rights Reserved.
 
Bestdotnet google plus
Enquiry Now