Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html xmlns = "http://www.w3.org/1999/xhtml">
- <head>
- <title>Character Processing Methods</title>
- <script type = "text/javascript">
- <!--
- var s = "ZEBRA";
- var s2 = "AbCdEfG";
- document.writeln( "<p>Character at index 0 in '" +
- s + "' is " + s.charAt( 0 ) );
- document.writeln( "<br />Character code at index 0 in '"
- + s + "' is " + s.charCodeAt( 0 ) + "</p>" );
- document.writeln( "<p>'" +
- String.fromCharCode( 87, 79, 82, 68 ) +
- "' contains character codes 87, 79, 82 and 68</p>" )
- document.writeln( "<p>'" + s2 + "' in lowercase is '" +
- s2.toLowerCase() + "'" );
- document.writeln( "<br />'" + s2 + "' in uppercase is '"
- + s2.toUpperCase() + "'</p>" );
- // -->
- </script>
- </head><body></body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement