Methods are the actions that can be performed on objects.
In the following example we are using the toUpperCase() method of the String object to display a text in uppercase letters:

 <script type="text/javascript">
var str="Hello world!";
document.write(str.toUpperCase());
</script>
 

The output of the code above will be:
HELLO WORLD!


This entry was posted on 6:34 AM and is filed under , . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

0 comments: