JavaScript ObjectExamples
Examples using built-in JavaScript objects.
String Object
- Return the position of the first occurrence of specified text in a string - indexOf() method
- Find a specific character in a string, and if found, return it - match() method
- For more string object examples, see ourJavaScript String Object reference manual.
Date Object
- Use getTime() to calculate how many milliseconds from 1970 to today
- Use toUTCString() to convert today's date (according to UTC) to a string
- For more Date object examples, see ourJavaScript Date Object reference manual.
Array Object
- For more Array object examples, see ourJavaScript Array Object reference manual.
Boolean Object
- For more Boolean object examples, see ourJavaScript Boolean Object reference manual.
Math Object
General
- For more Math object examples, see ourJavaScript Math Object reference manual.