Quick Reference to JavaScript Objects

his page provides an alphabetized list for JavaScript’s:

  • built-in objects
  • browser-specific objects
  • object’s properties
  • object’s methods
JavaScript ObjectJavaScript PropertiesJavaScript Methods
anchorname
text
x
y
areahash
host
hostname
href
pathname
port
protocol
search
target
arrayconstructorconcat(), join(), pop(), push(), reverse(), shift(), slice(), splice(), sort(), toSource(), toString(), unshift(), valueOf()
index
input
length
prototype
BooleanconstructortoSource(), toString(), valueOf()
prototype
buttonformblur(), click(), focus(), handleEvent()
name
type
value
checkboxcheckedblur(), click(), focus(), handleEvent()
defaultChecked
form
name
type
value
DateconstructorgetDate(), getDay(), getFullYear(), getHours(), getMilliseconds(), getMinutes(), getMonth(), getSeconds(), getTime(), getTimezoneOffset(), getUTCDate(), getUTCDay(), getUTCFullYear(), getUTCHours(), getUTCMilliseconds(), getUTCMinutes(), getUTCMonth(), getUTCSeconds(), getYear(), parse(), setDate(), setFullYear(), setHours(), setMilliseconds(), setMinutes(), setMonth(), setSeconds(), setTime(), setUTCDate(), setUTCFullYear(), setUTCHours(), setUTCMilliseconds(), setUTCMinutes(), setUTCMonth(), setUTCSeconds(), setYear(), toGMTString(), toLocaleString(), toSource(), toString(), toUTCString(), UTC(), valueOf()
prototype
documentalinkColorcaptureEvents(), close(), getSelection(), handleEvent(), open(), releaseEvents(), routeEvent(), write(), writeln()
anchors
applets
bgColor
classes
cookie
domain
embeds
fgColor
forms
height
images
lastModified
layers
linkColor
links
plugins
referrer
tags
title
URL
vlinkColor
width
eventdata
height
layerX
layerY
modifiers
pageX
pageY
screenX
screenY
target
type
which
width
x
y
fileUploadformblur(), focus(), handleEvent(), select()
name
type
value
formactionhandleEvent(), reset(), submit()
elements
encoding
length
method
name
target
functionargumentsapply(), call(), toSource(), toString(), valueOf()
arguments.callee
arguments.caller
arguments.length
arity
constructor
length
prototype
hiddenform
name
type
value
historycurrentback(), forward(), go()
length
next
previous
imageborderhandleEvent()
complete
height
hspace
lowsrc
name
src
vspace
width
layerabovecaptureEvents(), handleEvent(), load(), moveAbove(), moveBelow(), moveBy(), moveTo(), moveToAbsolute(), releaseEvents(), resizeBy(), resizeTo(), routeEvent()
background
bgColor
below
clip.bottom
clip.height
clip.left
clip.right
clip.top
clip.width
document
left
name
pageX
pageY
parentLayer
siblingAbove
siblingBelow
src
top
visibility
window
x
y
zIndex
linkhashhandleEvent()
host
hostname
href
pathname
port
protocol
search
target
text
x
y
locationhashreload(), replace()
host
hostname
href
pathname
port
protocol
search
MathEabs(), acos(), asin(), atan(), ceil(), cos(), exp(), floor(), log(), max(), min(), pow(), random(), round(), sin(), sqrt(), tan()
LN10
LN2
LOG10E
LOG2E
PI
SQRT1_2
SQRT2
mimeTypedescription
enabledPlugin
suffixes
type
navigatorappCodeNamejavaEnabled(), plugins.refresh(), preference(), savePreferences(), taintEnabled()
appName
appVersion
language
mimeTypes
platform
plugins
userAgent
NumberconstructortoSource(), toString(), valueOf()
MAX_VALUE
MIN_VALUE
NaN
NEGATIVE_INFINITY
POSITIVE_INFINITY
prototype
Objectconstructoreval(), toSource(), toString(), unwatch(), valueOf(), watch()
prototype
optiondefaultSelected
index
length
selected
text
value
passworddefaultValueblur(), focus(), handleEvent(), select()
form
name
type
value
plugindescription
filename
length
name
radiocheckedblur(), click(), focus(), handleEvent()
defaultChecked
form
name
type
value
RegExp$1...$9compile(), exec(), test(), toSource(), toString(), valueOf()
$_
$*
$&
$+
$'
$'
constructor
global
ignoreCase
input
lastIndex
lastMatch
lastParen
leftContext
multiline
prototype
rightContext
source
resetformblur(), click(), focus(), handleEvent()
name
type
value
screenavailHeight
availLeft
availTop
availWidth
colorDepth
height
pixelDepth
width
selectformblur(), focus(), handleEvent()
length
name
options
selectedIndex
type
Stringconstructoranchor(), big(), blink(), bold(), charAt(), charCodeAt(), concat(), fixed(), fontcolor(), fontsize(), fromCharCode(), indexOf(), italics(), lastIndexOf(), link(), match(), replace(), search(), slice(), small(), split(), strike(), sub(), substr(), substring(), sup(), toLowerCase(), toSource(), toString(), toUpperCase(), valueOf()
length
prototype
stylealignborderWidths(), margins(), paddings()
backgroundColor
backgroundImage
borderBottomWidth
borderColor
borderLeftWidth
borderRightWidth
borderStyle
borderTopWidth
clear
color
display
fontFamily
fontSize
fontStyle
fontWeight
lineHeight
listStyleType
marginBottom
marginLeft
marginRight
marginTop
paddingBottom
paddingLeft
paddingRight
paddingTop
textAlign
textDecoration
textIndent
textTransform
whiteSpace
width
submitformblur(), click(), focus(), handleEvent()
name
type
value
textdefaultValueblur(), focus()
form
name
type
value
textareadefaultValueblur(), focus(), handleEvent(), select()
form
name
type
value
windowclosedalert(), atob(), back(), blur(), btoa(), captureEvents(), clearInterval(), clearTimeout(), close(), confirm(), crypto.random(), crypto.signText(), disableExternalCapture(), find(), focus(), forward(), handleEvent(), home(), moveBy(), moveTo(), open(), print(), prompt(), releaseEvents(), resizeBy(), resizeTo(), routeEvent(), scroll(), scrollBy(), scrollTo(), setHotKeys(), setInterval(), setResizable(), setTimeout(), setZOptions(), stop()
crypto
defaultStatus
document
frames
history
innerHeight
innerWidth
length
location
locationbar
menubar
name
offscreenBuffering
opener
outerHeight
outerWidth
pageXOffset
pageYOffset
parent
personalbar
screenX
screenY
scrollbars
self
status
statusbar
toolbar
top
window

Notes

  • Objects: Core JavaScript objects (Array, Date, Math, etc.) and browser-specific objects (window, document, navigator, etc.).
  • Properties: Attributes of objects (e.g., length, prototype).
  • Methods: Functions that objects can execute (e.g., push(), getElementById()).

Here’s a structured table listing JavaScript’s built-in objects, browser-specific objects, along with their properties and methods:

CategoryObject/Property/MethodDescription
Built-in ObjectsArrayUsed to store multiple values in a single variable.
Array.lengthReturns the number of elements in an array.
Array.push()Adds one or more elements to the end of an array.
DateRepresents date and time functionality.
Date.now()Returns the number of milliseconds since January 1, 1970.
MathProvides mathematical functions and constants.
Math.random()Returns a random number between 0 and 1.
StringRepresents and manipulates a sequence of characters.
String.lengthReturns the length of a string.
String.toUpperCase()Converts a string to uppercase letters.
ObjectBase object for all JavaScript objects.
Object.keys()Returns an array of a given object’s property names.
Browser ObjectswindowRepresents the browser’s window (global object in browsers).
window.innerHeightReturns the height of the window’s content area.
window.alert()Displays an alert box with a message.
documentRepresents the web page loaded in the window (DOM entry point).
document.getElementById()Returns the element with the specified ID.
navigatorProvides browser and OS information.
navigator.userAgentReturns the user-agent header sent by the browser.
locationProvides current URL and navigation methods.
location.reload()Reloads the current page.
Propertieslength (Array/String)Returns the number of elements/characters.
prototype (Object)Allows adding properties/methods to all instances of an object.
Methodspush() / pop() (Array)Adds/removes elements from the end of an array.
charAt() (String)Returns the character at a specified index.
setTimeout() (window)Calls a function after a specified delay.
addEventListener() (DOM)Attaches an event handler to an element.

Notes:

  • Built-in Objects: Core JavaScript objects available in any JS environment.
  • Browser Objects: Provided by the browser (e.g., window, document).
  • Properties: Characteristics of objects (e.g., length, prototype).
  • Methods: Actions objects can perform (e.g., push(), alert()).

Here’s a detailed breakdown of JavaScript objects, properties, and methods in a structured table format:


1. Built-in JavaScript Objects

ObjectDescriptionKey PropertiesKey Methods
ArrayStores ordered collections of values.length (number of elements)push(), pop(), shift(), unshift(), slice(), splice()
DateHandles date and time operations.Date.now (current timestamp)getFullYear(), getMonth(), getDate(), toISOString()
MathProvides mathematical functions.Math.PI, Math.E (constants)random(), floor(), ceil(), max(), min()
StringRepresents and manipulates text.length (string length)charAt(), concat(), includes(), toUpperCase(), trim()
ObjectBase object for all JS objects.prototype (inheritance)keys(), values(), entries(), assign()
NumberWrapper for numeric values.MAX_SAFE_INTEGER, NaNtoFixed(), toString(), parseInt()
BooleanRepresents true or false.(None)valueOf()
RegExpHandles regular expressions.source (regex pattern)test(), exec()
FunctionRepresents a function.length (number of args)call(), apply(), bind()
PromiseHandles asynchronous operations.Promise.lengththen(), catch(), finally(), all(), race()
JSONParses and stringifies JSON data.(None)parse(), stringify()

2. Browser-Specific Objects

ObjectDescriptionKey PropertiesKey Methods
windowGlobal object in browsers.innerWidth, innerHeightalert(), setTimeout(), fetch()
documentRepresents the DOM (web page).title, URL, bodygetElementById(), querySelector(), addEventListener()
navigatorProvides browser/OS info.userAgent, platformgeolocation.getCurrentPosition()
localStorageStores data persistently in the browser.length (number of items)setItem(), getItem(), removeItem()
historyManages browser session history.length (history entries)back(), forward(), pushState()
locationProvides URL info and navigation.href, hostname, pathnamereload(), assign(), replace()
screenProvides display info.width, height, colorDepth(None)

3. Common Object Properties & Methods

CategoryNameDescription
PropertiesprototypeUsed to add properties/methods to all instances of an object.
length (Array/String)Returns the number of items/chars.
constructorReferences the object’s constructor function.
MethodstoString()Converts an object to a string.
valueOf()Returns the primitive value of an object.
hasOwnProperty()Checks if a property belongs to the object (not inherited).
isPrototypeOf()Checks if an object exists in another’s prototype chain.

4. Commonly Used Methods by Category

CategoryMethodExample Use
Arraymap()[1,2,3].map(x => x * 2)[2,4,6]
filter()[1,2,3].filter(x => x > 1)[2,3]
reduce()[1,2,3].reduce((a,b) => a + b)6
Stringsplit()"a,b,c".split(",")["a","b","c"]
replace()"Hello".replace("H", "J")"Jello"
ObjectObject.freeze()Prevents modifying an object.
Object.seal()Prevents adding/deleting properties.

Summary

  • Built-in Objects: Core JS objects (Array, Date, Math, etc.).
  • Browser Objects: Only available in browsers (window, document, localStorage, etc.).
  • Properties: Describe object characteristics (length, prototype).
  • Methods: Actions objects can perform (push(), getElementById()).