Showing posts with label Methods. Show all posts
Showing posts with label Methods. Show all posts
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!