JavaScript is an object-oriented language: unlike C, which includes a standard library of globally defined functions, JavaScript defines core object types (and wrapper objects for primitive types) that define their own methods. Only null and undefined have no methods.

References

Flanagan, David. Javascript: The Definitive Guide. 6th ed, O’Reilly, 2011.