Javascript

Topic: JS Objects

How to Accessing Object Properties?

Properties are the values associated with an object.The syntax for accessing the property of an object is:objectName.propertyNameThis example uses the length property of the String object to find the length of a string:var message="Hello World!";var x=message.length;The value of x, after execution of the code above will be:12

Browse random answers: