Home >> Javascript >> Objects in Javascript

Objects in Javascript

It is data type.

These objects are quite different from JavaScript’s primitive data-types(Number, String, Boolean, null, undefined and symbol) in the sense that while these primitive data-types all store a single value each.

Objects are more complex and each object may contain any combination of these primitive data-types as well as reference data-types.
An object, is a reference data type. Variables that are assigned a reference value are given a reference or a pointer to that value. That reference or pointer points to the location in memory where the object is stored. The variables don’t actually store the value.
Loosely speaking, objects in JavaScript may be defined as an unordered collection of related data, of primitive or reference types, in the form of “key: value” pairs. These keys can be variables or functions and are called properties and methods, respectively, in the context of an object.

Object :
university = {
    name : "IP University",
    location : "Delhi",
    established : "1985"

Post Your Comment

Next Questions
Onchange event
Onclick event
Onmouseover event
Onkeydown event
Onload event

Copyright ©2022 coderraj.com. All Rights Reserved.