Basic Reference Types
Matt Frisbie · 2019
European Computer Manufacturers AssociationScript (ECMAScript) provides a number of native reference types, such as Date, to help developers with common computing tasks. The ECMAScript Date type is based on an early version of java.util.Date from Java. ECMAScript supports regular expressions through the RegExp type. Regular expressions are easy to create using syntax similar to Perl. Three special reference types are designed to ease interaction with primitive values: the Boolean type, the Number type, and the String type. One of the unique aspects of JavaScript is that functions are actually instances of the Function type, meaning functions are objects. There are two singleton built-in objects defined by ECMA-262: Global and Math. The Global object contains all global variables and functions as properties. The Math object contains properties and methods to aid in complex mathematical calculations.