Property

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email
A property is an individual state of an object, typically represented as a variable. In the squirrel example the color represents a property of a squirrel. An object's properties can include any of the valid JavaScript variable types.

A variable's type is the kind of value it holds. Several basic variable data types are offered by JavaScript, including string, Boolean, integer and floating Point decimal.

JavaScript utilises loose casting, which means a variable can assume different types at will. For example:
squirrel.color = "black"
squirrel.color = 12
both colour values are valid. You can concatenate strings with integer, which will yield a string. For example:
val = 1
result = val + " is my rank "
// results in " 1 is my rank"
To access object properties, use the object's name, followed by a period and the name of the property
squirrel.color
Assigning a new value to the property will change it:,
squirrel.color = "green"



Domain Name Search

www.


Copyright (C) 2007. Web Domain design hosting. All rights reserved.