Question:What will be the output of following JavaScript code?
<script type="text/javascript"> var text = "This is a text"; var pattern = /is/; var output= text.search(pattern); document.write("Position: " + output); </script>
A Position:2
B Position:6
C Position:
D error
+ AnswerA
+ Report