indexof() in JavaScript

<script language="JavaScript">
    <!--
    var myString = new String("Hello, World!");

    document.write(myString.indexOf(" ") + '<br>');

    document.write(myString.indexOf("l", 4));

    document.close();

    -->
    </script>