My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life.... ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life.... ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life.... ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life.... ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
great video! just a question- what if you had to instantiate 100 users, or 1,000... Is there a looping structure that you'd have to utilize along with the class constructor? thank you!
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life.... ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life.... ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life.... ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
If I understood correctly, properties inside the constructor() are specific to each object while properties outside the constructor() are essentially inside of the object prototype property?
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life.... ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life.... ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
think of the constructor as creating an obkect. but we are never really calling the methods until later.... it's the same principle as declaring a function but not executing it. if i create a constructor named class Man with a goFart() method its like declaring the function on Man... in other words its like saying "this is what you are supposed to do when i tell you to fart. i haven't actually executed it yet or told the Man to fart. i execute it by saying Man.goFart() hope that helps lol
asad uzzaman, you have a point there dude!!! I suggest a real world example, I know Ninja can find a way, and it doesn't have to be a free one, even a paid one that will be great; as we'll be saying "thanks" by buying it
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life.... ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
what different between this function personne(name,prenome,login) { this.name=name; this.prenome=prenome; this.login=function() { console.log(this.name); } } var zakaria=new personne("zakaria","zahidi"); console.log(zakaria.name); and this class personne { constructor(name,prenome){ this.name= name; this.prenome = prenome; } login() { console.log(this.name); } }
You didn't declare email and name as a global variables in the class, but you could refer and set this variables in the constructor. This is stupid feature and a bad practice in my opinion, these variables should be undefined. Why poeple who worked on ES6 make this posible and automatic, I don't know, but, in my opinion, it's dumb and a bad practice. If they introduce classes they should do it properly.
Wow! Now I can understand what I have always seen on the console in the Chrome browser! Thank you!!!!!!
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life....
ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
Yeah, finally i got main difference between objects and classes
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life....
ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
You just explained a ocean into a lake great video keep it up
Encapsulation is so powerful :)
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life....
ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
Great explanation bro..
Well explained..
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life....
ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
great video! just a question- what if you had to instantiate 100 users, or 1,000... Is there a looping structure that you'd have to utilize along with the class constructor? thank you!
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life....
ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
Put the new user in The loop and assign the new object to the indexed position in an array
Thanks man this helped alot
Which theme do you use in vs code? Because it looks really nice.
monokai pro
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life....
ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
Class / constructor syntax highlighting for Sublime Text 2. Any recommendations? Great vids, thanks.
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life....
ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
i have finally understood this
If I understood correctly, properties inside the constructor() are specific to each object while properties outside the constructor() are essentially inside of the object prototype property?
thanks
excellent
console.log(this.email, ' just logged in'); --> why there is a ", " comma after this.email ? :)
I'm wondering the same thing!
You need a comma or a plus to a concatenatea variable to a string. The comma just adds the space in between for you.
@@nikulasoskarsson5472 bro you mean that it works same + or , . Or is there any other difference
@@sayedsulimanvideos comma adds a space, plus doesn't
@@sayedsulimanvideos From what I know, I don't think so. I personally write it like console.log(name, ''likes coding') since it's far easier.
are classes still used in JavaScript ? hasn't everything shifted to being function based now?
there are 2 different paradises in javascript, functional and object oriented. They are both used.
what is your vs code theme name?/
wow tnx
Salut :)
Big MERCI ;)
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life....
ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
how about we want to have math operator in class
How to pass arguments to those functions?
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life....
ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
Why putting methods outside of constructor class ??
because we use constructor only to initialize objects, methods have seperate role.
think of the constructor as creating an obkect. but we are never really calling the methods until later.... it's the same principle as declaring a function but not executing it. if i create a constructor named class Man with a goFart() method its like declaring the function on Man... in other words its like saying "this is what you are supposed to do when i tell you to fart. i haven't actually executed it yet or told the Man to fart. i execute it by saying Man.goFart()
hope that helps lol
hey please give a real example after complete this ooj series as soon as possible
asad uzzaman, you have a point there dude!!!
I suggest a real world example, I know Ninja can find a way, and it doesn't have to be a free one, even a paid one that will be great; as we'll be saying "thanks" by buying it
My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life....
ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
what different between this
function personne(name,prenome,login)
{
this.name=name;
this.prenome=prenome;
this.login=function()
{
console.log(this.name);
}
}
var zakaria=new personne("zakaria","zahidi");
console.log(zakaria.name);
and this
class personne
{
constructor(name,prenome){
this.name= name;
this.prenome = prenome;
}
login()
{
console.log(this.name);
}
}
the first one is just way too complicated lol
at tutorial#6: why am i getting "undefined" ---> undefined 'Just logged out'
thanks for explaining the meta course does a horrible job explaining classes most of it is reading. i hate reading
can i call you "senpai" ? (>v
{2023-08-01}
You didn't declare email and name as a global variables in the class, but you could refer and set this variables in the constructor. This is stupid feature and a bad practice in my opinion, these variables should be undefined. Why poeple who worked on ES6 make this posible and automatic, I don't know, but, in my opinion, it's dumb and a bad practice. If they introduce classes they should do it properly.