JavaScript is an easy object-oriented paradigm. A object could be a assortment of properties and property is an association between a reputation (or key) and a value. the worth of a property will be a operate, within which case the property is thought as a technique.
Objects in JavaScript, as in several different programming languages, will be compared to things in reality. In JavaScript, object could be a separate entity with properties and a kind. Compare it to a cup, as an example. A cup is object with properties. A cup includes a color, design, weight, material it's product of, etc. Similarly, JavaScript objects will have properties that outline their properties.
In addition to the objects that ar predefined within the browser, you'll be able to outline your own objects. This chapter describes the way to use objects, properties, and strategies, and the way to form custom objects.
The syntax for an object is the following:
const javaScriptOBJ = {
name: value,
2: value,
property: value
};
//how to access oject value
Console.log(javaScriptOBJ.name)