JavaScript object is a non-primitive data type that allows you to store multiple collection of data. It can store string, number, Boolean, object, array, function as a method, null, undefined values.
Syntax:
const obj = {
name: "Mozahedul",
age: 23,
loggedIn: true,
teacher: ["Abul", "hossain"],
totalSalary: function(a, b) {return a / b * 100},
students: {
name: "Rasel",
age: 32
}};
Post a Comment