Javascript

Topic: JS Objects

How to Accessing Objects Methods?

Methods are the actions that can be performed on objects.You can call a method with the following syntax:objectName.methodName()This example uses the toUpperCase() method of the String object, to convert a text to uppercase:var message="Hello world!";var x=message.toUpperCase();The value of x, after execution of the code above will be:HELLO WORLD!

Browse random answers: