Constructor as a Class in JavaScript (Hindi)
HTML-код
- Опубликовано: 27 окт 2024
- Constructor as a Class 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
RUclips Channel: / geekyshow1
Facebook: / geekyshow
Twitter: / geekyshow1
Google Plus: plus.google.co...
Website: www.geekyshows....
___________________________________________________________
Make sure you LIKE, SUBSCRIBE, COMMENT, and REQUEST A VIDEO :)
___________________________________________________________
Thank You Sir
You rock man.
what will happen if we don't give this keyboard with all instance variable , i mean var Mobile = function(m, s) { model = m; sp = s} ;
Thank u so much sir
very simplified tuts thanks
Thanks for this video 😊
BHAI PLAYLIST KI NUMBERING KRO DOWMLOAD KRTE HAI TO DIKKAT AATI HAI SEQUENCE SMJ NE ME
I get Type error :"Mobile is not a constructor"
when I using this code with arrow function
var Mobile = (model)=> {
this.model = model;
}
var nokia = new Mobile(3310)
console.log(nokia.model)
but if I am using the same code with function (mdoel){} it is giving me right output.
Why please anyone or geeky show assist.
Same problem
thanks
Constructor as a Class
//Constructor as a Class
/*
javascript k ander sirf object ka object create krte
hain
javascript k ander class nhe hote wo hum samjany k
liye kehte hain
*/
//ye hai object par as class hum use kr rhy hain
var Mobile = function (model_no,sprice){
this.model=model_no;
this.color='white';
this.price=300;
this.sp=sprice;
//is ko method kehte hain
this.sellingprice=function(){
return(this.price + this.sp);
};
this.data=function(){
document.write("Model no:" +
this.model +"price :"+
this.sellingprice());
}
};
var samsung = new Mobile('galxy',2000);
var nokia = new Mobile('3145',2000);
nokia.data();
you are saying that there is no class in JS but yet you are explaining about class in JS.....can you please elaborate?? :)
This is illusion. just to give programmer easy of work. Behind the scene all are same. I have already answered this question in a video.
bro constructer wali videos boht confuse kr rahi hain i don't know why
Thanks a loooooooooooooooooooooooooooooooooooooooooooooooot
Thanks a looooooooooooooooooooooooooooooooooooooooooot
var Student01 = function(name) {
this.names = name;
this.age = 18;
this.class = 12;
this.details = function() {
return(this.age+this.class);
};
}
var rollNo1 = new Student01("rohan");
rollNo1.details();
not working
This. Age+" " +this.class
Return statement mein error hai
@@ankursinha129 sahi kaam kr rha hai. maine document.write(rollNo1.details()); kr k nhi dekha tha isliye mujhe output nhi mila tha.
Ok bhai Maine bs space lga diya lol sry.
@@mohammedgazali6250 😂😂
current time class aa gaya hai JavaScript me
Classes were introduced in ECMAScript 2015, also known as ES6, which was released in June 2015.
OWSM SIT G
abhi jo aap bata rehe hai,,,aap ko khud acche se nahi pata........................itna mera gurenty hai.
Lawadu