JavaScript Object

In JavaScript , almost everything is object exception primitive types.

  • Objects can be Booleans (if defined with the new keyword)
  • Objects can be numbers (if defined with the new keyword)
  • Objects can be strings (if defined with the new keyword)
  • All dates are objects.
  • Math is always about objects.
  • Invariably, regular expressions are objects.
  • All arrays are objects.
  • All functions are objects.

Object can be single value, name:value pair and methods .

Example Code;

Output:

Shri

Developer

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top