<!-- SophiaKnows -->

JAVASCRIPT BUILT-IN OBJECTS
Rev 4: Dec 2004

OBJECT PROPERTIES METHODS
Array() length concat()
join()
reverse()
slice()
sort()
toSource()
toString()
Date() none getDate()
getDay()
getHours()
getMinutes()
getMonth()
getSeconds()
getTime()
getTimeZoneoffset()
getYear()
parse()
prototype()
setDate()
setHours()
setMinutes()
setMonth()
setSeconds()
setTime()
setYear()
toGMTString()
toLocaleString()
UTC()
Math none abs()
acos()
asin()
atan()
atan2(y,x)
ceil()
cos()
exp()
floor()
log()
max(x,y)
min(x,y)
pow(x,y)
random()
round()
sin()
sqrt()
tan()
String length
prototype
anchor
big
blink
bold
charAt
fixed
fontColor
fontSize
indexOf
italics
lastIndexOf
link
small
split
strike
sub
substring
sup
toLowerCase
toUpperCase

 

Array()
PROPERTIES
length

METHODS
concat()Return two or more arrays as a new array
join([delimiter])Joins elements into a string separated by specified [delimiter]
reverse()Reverses the order of the elements in an array
slice(x[,y])Creates a new array from section x-y of an existing array
sort()Sorts the elements of an array from A-Z
toSource()Returns string representing the source code of the array
toString()Returns string representing the array and its elements

 

Date()
PROPERTIES
none

METHODS
getDate()Returns the date of a Date object (from 1-31)
getDay()Returns the day of a Date object (from 0-6)
getMonth()Returns the month of a Date object (from 0-11)
getFullYear()Returns the year of a Date object (four digits)
getYear()Returns the year of a Date object (from 0-99)
getHours()Returns the hour of a Date object (from 0-23)
getMinutes()Returns the minute of a Date object (from 0-59)
getSeconds()Returns the second of a Date object (from 0-59)
getMilliseconds()Returns the millisecond of a Date object (from 0-999)
getTime()Returns the number of milliseconds since Jan 01 1970 00:00:00
getTimezoneOffset()Returns the time difference between the user's computer and GMT
getUTCDate()Returns the date of a Date object in universal (UTC) time
getUTCDay()Returns the day of a Date object in universal time
getUTCMonth()Returns the month of a Date object in universal time
getUTCFullYear()Returns the four-digit year of a Date object in universal time
getUTCHours()Returns the hour of a Date object in universal time
getUTCMinutes()Returns the minutes of a Date object in universal time
getUTCSeconds()Returns the seconds of a Date object in universal time
getUTCMilliseconds()Returns the milliseconds of a Date object in universal time
toGMTString()Converts the Date object to a string, set to GMT time zone
toLocaleString()Converts the Date object to a string, set to the current time zone
toString()Converts the Date object to a string

Math
PROPERTIES
none

METHODS
abs(x)Returns the absolute value of x
acos(x)Returns the arccosine of x
asin(x)Returns the arcsine of x
atan(x)Returns the arctangent of x
atan2(y,x)Returns the angle from the x axis to a point
ceil(x)Returns the nearest integer greater than or equal to x
cos(x)Returns the cosine of x
exp(x)Returns the value of E raised to the power of x
floor(x)Returns the nearest integer less than or equal to x
log(x)Returns the natural log of x
max(x,y)Returns the number with the highest value of x and y
min(x,y)Returns the number with the lowest value of x and y
pow(x,y)Returns the value of the number x raised to the power of y
random()Returns a random number between 0 and 1
round(x)Rounds x to the nearest integer
sin(x)Returns the sine of x
sqrt(x)Returns the square root of x
tan(x)Returns the tangent of x

String
PROPERTIES
length
prototype

METHODS
anchor()Returns a string as an anchor
big()Returns a string in big text
bold()Returns a string in bold
charAt(index)Returns the character at a specified position
charCodeAt(i)Returns the Unicode of the character at a specified position
concat()Returns two concatenated strings
fixed()Returns a string as monospace text
fontcolor()Returns a string in a specified color
fontsize()Returns a string in a specified size
fromCharCode()Returns the character value of a Unicode
indexOf()Returns the first index of the specified characters, or -1 if unmatched
italics()Returns a string in italic
lastIndexOf()Returns the last index of the specified characters, or -1 if unmatched
link()Returns a string as a hyperlink
match()Returns the first index of the specified characters, or null if unmatched
replace()Replaces some specified characters with some new specified characters
search()Returns the index of the specified characters, or -1 if unmatched
slice()Returns a string containing a specified character index
small()Returns a string as small text
split()Splits a string into an array of strings
strike()Returns a string strikethrough
sub()Returns a string as subscript
substr()Returns the specified characters.
substring()Returns the specified characters.
sup()Returns a string as superscript
toLowerCase()Converts a string to lower case
toUpperCase()Converts a string to upper case

 

< CODEBASE | TOP^ | MAINPAGE >

Text & Design By Tony Pisarra
© SophiaKnows 1998-2004