Martha's COIN 70b JavaScript Test Page

String Methods - charAt()

Script:

    var charAtStr = prompt("Please enter a sentence:", "Let's see what happens!");
    var pos = prompt("Please enter the character position you are looking for:", 10);

    alert('"' + charAtStr + '".charAt(' + pos + ') = ' + charAtStr.charAt(pos));