object:
an object is used to store data in key -value pairs.
javascript
let person={
name:"haarish",
age:21
};
console.log(person.name);
output.
haarish
funtion
A funtion is a reusable block of code that perform a specific task.
example?
funtion great() {
console.log("Hello")
}
great();
output.
Hello
in simple words:
.object=store data
.funtion=performs a task
Top comments (0)