ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก
Prototype Inheritance in JavaScript (Hindi)
ฝัง
- เผยแพร่เมื่อ 21 ก.ค. 2018
- Prototype Inheritance in JavaScript
You can find out our HTML Complete Video tutorials :
goo.gl/O254f9
CSS Complete Video Tutorial Playlist:
goo.gl/On2Bh1
Feel free to share this video
JavaScript Complete Video Tutorial Playlist
goo.gl/A517jQ
Check Out Our Other Playlists:
/ geekyshow1
SUBSCRIBE to Learn Programming Language !
goo.gl/glkZMr
Learn more about subject:
www.geekyshows....
__________________________________________________________
If you found this video valuable, give it a like.
If you know someone who needs to see it, share it.
If you have questions ask below in comment section.
Add it to a playlist if you want to watch it later.
___________________________________________________________
T A L K W I T H M E !
Business Email: contact@geekyshows.com
TH-cam Channel: / geekyshow1
Facebook: / geekyshow
Twitter: / geekyshow1
Google Plus: plus.google.co...
Website: www.geekyshows....
___________________________________________________________
Make sure you LIKE, SUBSCRIBE, COMMENT, and REQUEST A VIDEO :)
___________________________________________________________
2 month ago i watched full tutorial of js from a youtube channel named as CodeWithHarry , literally many times i tried to understand prototype inheritance but i did not get and i avoid geeky shows tutorial coz of it's too old we should learn from new content but i am wrong @geekyShow your content #oldIsgold i get in only in a single video really appriciatable thanks for it. advice for evryone nothing is old man.....
Love from Pakistan. love u man. i was struggling with this...actually i am taking lecture from Code with Mosh.
but he didnt use Graphical explanation like u did. i am clear now,,,,about many things. Thank You
Very nice explanation
bohat aala brother.... kya baat h
why we reset constructor.....if we dont reset this than what causes are??
We are not inheriting the prototype of Mobile class in Samsung class but we are exchanging the Samsung class's prototype with Mobile class's prototype. Is it right or wrong sir??
after spending one hour in console , i got this point.
very well explained. Just made my notes. thanks dear
best best best best best best ever lecture seen on youtube. Thanku so much brother, God bless you
Thanks and welcome
Really mam js is tough.
bahut tough........ yaha dimaag ka dahi ho rakha h
you explained prototype so well,i mean like wow ,aap plz aur videos bnao ,in react and angular ,prototype is clear now .thankyou so much .
You can follow our Playlist Tab for other Courses :- th-cam.com/users/GeekyShow1playlists
React JS dekhne k liye iss link ko follow kijiye th-cam.com/play/PLbGui_ZYuhignjLLXTJWkRJKN-SgAqClL.html
concept clear thank you sir
Thanks you sir yours explanation superb iam fan of you ❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️
Which is better framework for JS, react.js or jquery????
react aur jquery dono alag hai, pahle iye to jaan lo ki react aur jquery hai kya!
Here the Object. create() function creates an object of the type that we passed in it as an argument. so with that the __proto__ property of the samsung.prototype object will point to the object. prototype only instead of that mobile.prototype object and because of that reason we only need to reset the constructor property of the Samsung.prototype object.
Excellent 🙏
Sir, please make short video or make two videos of one topic
To reach to end for both constructors, if we inherit prototype from mobile to samsung
mobile = mobile.prototype.__proto__.__proto__
samsung = samsung.prototype.__proto__.proto__.proto__
and if dont set samsung.prototype.constructor = samsung then we try the reverse method from prototype to constructor, it will still point to mobile() because of inheritance. which is in fact not logically correct.
Suscribe kar diye concept clear kar diya
Good explanation
Your video lecture is very good, but i have a doubt. suppose we pass parameter in in parent function and create object of child then how we call parent by using child object please clear it. Thank You.
you are a superb teacher.....
Why we resetting? Pls explain.
* Even if we write only prototype inheritance code then also it runs d code.
But why we should write that reset code ? Pls explain. Thank you.
We can inherit the properties and prototype individually.
Prototype explained so well!Thank you sir.
Explained so well....thanku sir👍
Thank You Sir
why we reset constructer bro pls explain?
You are best best best!!!🙌🙌🙌🙌🙌🙌
Prototype jaisi complicated concept ko itni aasani samja diya.
Hi Can u plz help me on this, prototype inheritance is not working
why should we clear this? it's not clear to me.
Samsung.prototype.constructor = Samsung
would you please explain this code?
And also say why we reset constructor.....if we dont reset this than what causes are??
great explanation thank u sir
This channel is a hidden gem!! 💙
one of the best javaScript tutorials
Sir apne jo new object m create kiya h aur bta hain k, m.b acess nahi hoga, but m kar pa raha hu. it showing the value, not undefined. Please tell me
i am use this code:
{var Mobile =function(){
this.a=10;}
Mobile.prototype.z=40;
var x= new Mobile();
}
{var Samsung= function(){Mobile.call(this);
this.b= 20;}
Samsung.prototype= Object.create(Mobile.prototype);
Samsung.prototype.p=40;
var y= new Samsung();
var w= new Samsung();
document.write(w.a + "");
document.write(w.b + "");
document.write(w.z + "");
}
very nice explained
Explanation is too Good Thank you👌🙏
Nice thanks sir.
most underrated channel
sir ko sayed Samsung.prototype.__proto__=Object.create(Mobile.prototype); ye likhna chaiye tha may be
Mobile object me this.a to prototype property nhi h phir bhi access ho rha h. Jabki aapne kha tha ki sirf prototype property aur methods Hi inherit ho sakte h
he has used call method and not oblect.create method. object.create method is used to inherit the prototype
usne Mobile.call(this) use kiya hai jo inherit kar rha hai a ko
Its level is overpaid level
Hats off
Well explained buddy
NIce explanation..
Sir (function($, H, window){ block statement}(jQuery, themeHeader, window)); iska motlab keya hay ?
Watch this th-cam.com/video/pjo0DSuHQzc/w-d-xo.html
Please make more video on javascript oops.
Please cover all advance concept.
Because.
I had study prototype, inheritance from many websites( like w3, mozilla) and books but could not get it.
But your strategy of teaching is awsome now i clearly inderstood how prototype works what how to inherite it.
Please share video on event loop.
check Akshay Saini namaste javascript
Nice explanation :)
awesome tutorial...
Ek number samjhaya bhai! Bas ek question, kya Prototype wali functionality sabhi browsers me available hai ?
Yes
@@geekyshows , thank you sir.
@@geekyshowsbhai pichhle ek saal se 100 ke karib comments kar chuka hu pls quick sort or merge sort per ek video bana dijiye pls pls....pls ...bhai pls.
@@aryathegreatengineer5215 mysirg for sorting algorithm
cool
a couple of questions.
1. Why didn't we wrote:: this.z = 30 inside Mobile constructor instead of Mobile.Prototype.z = 30
2. Why can't we do this:: Mobile.z = 30 if functions are also objects, and access z inside Samsung Object.
3. Can we do this: Samsung.Prototype = Mobile.Prototype. If not, then why.
sir ko sayed Samsung.prototype.__proto__=Object.create(Mobile.prototype); ye likhna chaiye tha may be
brother i had done same thing...
Child.prototype = Base.prototype;
console.log(Child.prototype.constructor);
console.log("prototype : " + ch.__proto__.childVarPt);
and the result is insane ... simple technique than sir have taught to us
/*
this is just a complete task which i have started to understand some concept by my self...
because these questions are arises to my mind during learning by video and i have solved those questions and result is insane...
function Base() {
this.baseVar = 10;
}
function Child() {
this.childVar = 20;
}
let bs = new Base();
let ch = new Child();
console.log("constructor : " + bs.baseVar);
console.log("constructor : " + ch.childVar);
Base.prototype.baseVarPt = 10;
Child.prototype.childVarPt = 20;
console.log("prototype : " + bs.__proto__.baseVarPt);
console.log("prototype : " + ch.__proto__.childVarPt);
console.log("Accessing super's from child's....");
Child.prototype = Base.prototype;
console.log(Child.prototype.constructor);
console.log("prototype : " + ch.__proto__.childVarPt);
/*
ch.__proto__ = bs.__proto__; //setting base prototype link OR connection to the child prototype..
console.log(ch.__proto__.baseVarPt);
console.log(ch.__proto__.constructor);
*/
*/
some comment issues due to youtube textbox but solve by your own...
write this code also in the program above for your 1st question...
-------------------------------------------------------------------------------------------------------
console.log("baseVar" in Base.prototype);
console.log("baseVarPt" in Base.prototype);
Thank You
why can't we do Samsung.prototype = Mobile.prototype ??
Sir jquery kb start kr rhe ho
And Java script ki ye Playlist kb khatam hogi
Let person = { name: "geek" } is this also a constructor?
No it is not a constructor....
function Person(){
this.name = "geek" ;
}
☝️ This Is Constructor
This Is Only A simple Object....
mobile.call() me mObile k parameterss me argument de tw access ni hoga kia
bhai hmko sikhna to yhi hai jo apne video me cover kiya hai. lekin smjh nhi aaya thk se,
Its a difficult topic watch one more time
Constructor reset kem karvu pade che?
Sabse ghatiya tutorial ...sala jab es6 aa hi gaya to kyu prototype ki asi taise kar raha hai jo cheez ek video m bata sakta hai vo content badane k liye ..5 -6 video m batat hai .. bhai tune to dimag kharab kar diya sach me