JavaScript is an Object Oriented Programming (OOP) language. A programming language can be called object-oriented if it provides four basic capabilities to developers −
Encapsulation − the capability to store related information, whether data or methods, together in an object.
Aggregation − the capability to store one object inside another object.
Inheritance − the capability of a class to rely upon another class (or number of classes) for some of its properties and methods.
Polymorphism − the capability to write one function or method that works in a variety of different ways.
Objects are composed of attributes. If an attribute contains a function, it is considered to be a method of the object, otherwise the attribute is considered a property.
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.
Video by – Tanmay Sakpal
Simple Snippets Channel link – https://www.youtube.com/simplesnippets
Original source
17 responses to “#18 JavaScript Tutorial | Objects p.2”
btw sir what is the use of object of data types(in the real world) 3:20
Sir agar constructor through object banaye aur usme kise attribute add kare toh uska affect sabhi object per hoga ya phir jisme update kiya hai usme hoga.
Can you show us shortcut u are using in keyboards so that we can gain the same speed as you
thank you @telusko for providing such marvellous videos……..
Good Tutorial series for beginners
class use kar bhai
Is there a way to add properties to an object if we are defining them as a function instead of a variable?…please let me know if the question isn't clear…i shall elaborate
function Car(car_brand,car_model,price)
{
this.car_brand = car_brand;
this.car_model = car_model;
this.price = price;
this.testautopilot() = function()
{
document.write("Learning objects in JS");
}
}
var c1 = new Car("mustang","model9",60000);
c1.testautopilot();
document.write(c1.car_brand);
Nothing is getting printed in the browser.
Can you please tell me where I am going wrong?
Hey bro!
I wanted to ask a little thing.
What plugins or extensions are you using with VSCode?
yeah super content
Please add more videos on class and related concepts .
Yes nice.. 🙏🙏..
Why…. I mean why … The helll……. You don't use a dark theme…. 😒😒
Thanks you very much sir for explaning the concept of objects in JS. 😄
Very precise 👌👌👌
When you start mysql
1th wow