One Super and Two SubClasses in JavaScript (Hindi)
ฝัง
- เผยแพร่เมื่อ 11 ก.ย. 2024
- One Super and Two SubClasses 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 :)
___________________________________________________________
please explain why we reset the inheritance constructor?
Sabse jyada time laga apki iss video ko samghne ar cover karne me..........but maja ayya
Why we reset the inheritance constructor?
thanks for awesome video but ye smjh nhi aaya k constructor ko reset q krte h, bina reset kiye b work krta h...... please reply
Same problem
Very helpful tutorial.
sir here i think is a demerit
function extend (child,parent) {
child.prototype = Object.create(parent.prototype);
child.prototype.constructor = child;
} is fine, but when i try to add
child.prototype.anything = function () {
return(this.xyz);
}
and if i try to access this function through the object of its class it shows this function is not defined. why?
owsm sir g very helpful to learn
Sir please tell me why we are reset constructor ?
because by default prototype object has 2 fields. one is constructor and second is prototype. but for this line "Lenovo.prototype = Object.create(Mobile.prototype);" we override the prototype object and now it has not second field called constructor. so that's why we need to reset the constructor. and need to put this line as well "Lenovo.prototype.constructor = Lenovo;"
nice explanation
Well described
You are great.
but how can I memorize those code? what should I do for that?
When you do big projects then you'll remember it automatically. Just practice, practice, practice.
Sir , why you make constructor reset ? samsung.prototype.constructor = samsung ..
because by default prototype object has 2 fields. one is constructor and second is prototype. but for this line "Lenovo.prototype = Object.create(Mobile.prototype);" we override the prototype object and now it has not second field called constructor. so that's why we need to reset the constructor. and need to put this line as well "Lenovo.prototype.constructor = Lenovo;"
Mera work nahi ho raha inherent function
thanks
sir plz its your first video out of 86 that is a little confusing plz sir make a video again on this topic
Why we need reset constructor in inheritance?
because by default prototype object has 2 fields. one is constructor and second is prototype. but for this line "Lenovo.prototype = Object.create(Mobile.prototype);" we override the prototype object and now it has not second field called constructor. so that's why we need to reset the constructor. and need to put this line as well "Lenovo.prototype.constructor = Lenovo;"
sir agr super class k prototype k method me koi argument de na ho tw kese de ge
Sir recursion k liye video hai, please reply?
why we are using constructor reset ?? alert("plz any one can clear my doubt")
because by default prototype object has 2 fields. one is constructor and second is prototype. but for this line "Lenovo.prototype = Object.create(Mobile.prototype);" we override the prototype object and now it has not second field called constructor. so that's why we need to reset the constructor. and need to put this line as well "Lenovo.prototype.constructor = Lenovo;"
Sir iske baare mei batao plzz constructor reset kyu krte hai???
bro aap ES6 ka use nehi kar rahe ho...getter, setter etc ka bhi use nehi kar rahe
// class
var Mobile=function (){
};
// prtotype method
Mobile.prototype.getModel=function(){ return this.model;}
var mob=new Mobile();
document.write(mob.getModel());
sir mujhe yahi par parameter deke model print karana ho to sir hum karenge, sir please help and reply to me
Bhiya hmlog constructor kyu reset krte h iski kya jrurat h ??
*Samsung.prototype.constructor = Samsung;*
Line kyu likhte hai sir? uski kya jarurat hai? usse code me kya effect hoga?
Reset constructor
Is code se constructor ko reset krte h
@@johncena-qo2hq thanks John cena.😊👍
what is the use of call(this)?..by this also we r accessing other members?
accotding to c++ when access to funtion member that time we need to call it thas why we are using here some concept here but i am not sure
@@raeesh2373 java karani chahiye yaa cpp
why reset the constructor ??
because by default prototype object has 2 fields. one is constructor and second is prototype. but for this line "Lenovo.prototype = Object.create(Mobile.prototype);" we override the prototype object and now it has not second field called constructor. so that's why we need to reset the constructor. and need to put this line as well "Lenovo.prototype.constructor = Lenovo;"
i can do this also
Object.call(Mobile());
confusing
Why getmodule ?????
Ye function h getModel() nam se yeha hum koi b namm rakh sakte h jaise ur name is anish to...getAnish()...etc
You are too predictable now I guess your object name without seeing
It will help to understand the concept easily. I also follow one pattern to explain various languages and frameworks so if A Person learns Django at Geekyshows He/She can easily grab other framework like Laravel at Geekyshows. I try to make them similar as much as possible.
@@geekyshows yes I know that it's really convenient and easy to understand take this as complement thanks to your hard work I can easily understand the basics of the js