function Person(name) { this.name = name; } Person.prototype.greet = function(greeting) { return greeting + ', My name is ' + this.name; }; const anbuPerson = new Person('Anbu'); const trishaPerson = new Person('Trisha'); // Now you can pass an argument to the greet method: console.log(anbuPerson.greet('Hello')); // "Hello, My name is Anbu" console.log(trishaPerson.greet('Hi')); // "Hi, My name is Trisha"
const arr = [{ name: 'Ammu' }, {name: 'Bommu'}] // access the arr and find out the object where you want to add new element. In my case, i will add to 'Ammu' obj. arr[0].newElement = 'kutty' Since, arr[0] -> points out to array of index 0, it will point out the { name: 'Ammu' } For detail information, watch our Modern JS series.
குருவே சரணம்🙏🙏🙏🙏🙏
Awesome Bro❤🤝. The prototype concept was directly injected into my core memory 🧠.
Your comment injected into my heart. Thanks. 🙂👍
very useful video
Thanks a lot for the video ❤
Waiting for this for long time. Finally you posted it. Thanks anbu.
Glad it helped.
Pakka.. Time eduthalum... I can understand the topic clearly.
Knowledge matters. Time isn't.
are u staying in avadi ?
Next inheritance topic podunga brother
We have discussed about adding our own prototype to the prototype chain. Thats what we call as Prototype inheritance. Watch it on 08:09
function Person(name) {
this.name = name;
}
Person.prototype.greet = function(greeting) {
return greeting + ', My name is ' + this.name;
};
const anbuPerson = new Person('Anbu');
const trishaPerson = new Person('Trisha');
// Now you can pass an argument to the greet method:
console.log(anbuPerson.greet('Hello')); // "Hello, My name is Anbu"
console.log(trishaPerson.greet('Hi')); // "Hi, My name is Trisha"
oru array kula onject iruku antha existing object kula oru new element create panum yapadi bro
const arr = [{ name: 'Ammu' }, {name: 'Bommu'}]
// access the arr and find out the object where you want to add new element. In my case, i will add to 'Ammu' obj.
arr[0].newElement = 'kutty'
Since, arr[0] -> points out to array of index 0, it will point out the { name: 'Ammu' }
For detail information, watch our Modern JS series.
Super Brooo
Brooo tailwind learn pannalama bootsrap aa brooo which one is best
First learn bootstrap. And then tailwind..
Everyone is using tailwind, and you should know about that.
hi anna can you make vedios in mern
you previous vedio for the mern stact is lot and lot help full for me
a kind request anna
What you want exactly in MERN? Can you be specific so we can deliver such expectation to you.
Anbu anna neenga asyn await promis fetch api potuvingala
Yes. that will be covered in this series. Stay tuned!
useful bro.
🤝
Video video video yanga brooo
Scheduled! have a great weekend. Will come from monday.
@@CyberDudeNetworks Monday varuvingala 😅