21: What Are Objects in JavaScript | How to Create an Object in JavaScript | JavaScript Tutorial

Поделиться
HTML-код
  • Опубликовано: 1 окт 2024
  • In this JavaScript tutorial you will learn about JavaScript Object Oriented Programming, which is a much more efficient way of creating JavaScript code. We will also look at how to create JavaScript objects and move towards learning about object constructors.
    There is one thing from recording this episode I need to clarify!
    In the video I explain that properties and methods are essentially variables and functions that are created inside objects. I just want to clarify that I'm aware that this is not completely true. I just made this comparison to help people get the idea behind what objects are and what they contain :)
    List of global objects: developer.mozi...
    Meet Daniel: another Full-Stack developer who can teach you coding fast and free :D
    / @danielsimionescu298
    ➤ GET ACCESS TO MY LESSON MATERIAL HERE!
    First of all, thank you for all the support you have given me!
    I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!
    I am now using Patreon to share improved and updated lesson material, and for a small fee you can access all the material. I have worked hard, and done my best to help you understand what I teach.
    I hope you will find it helpful :)
    Material for this lesson: / lesson-material-42361704

Комментарии • 112

  • @Gaublyn
    @Gaublyn 6 лет назад +59

    I've been watching your videos for the last few days. They are well put together and wanted to thank you by not only subscribing and putting notifications on, but by actually Thanking you for the time and work you put into these videos and making them easy to follow along with.

    • @InstructorVictor
      @InstructorVictor 5 лет назад +5

      I agree. I think his take on things is great for beginners, especially if you want to pick up the basics. I try to be as approachable, too, and I think I can get the point across well. Check out my own tutorial when you can: ruclips.net/video/5CN-7MOsMsg/видео.html

    • @igboerikauzoma4127
      @igboerikauzoma4127 2 года назад

      @@InstructorVictor what is this for exactly?🤨

  • @quibetamos8954
    @quibetamos8954 5 лет назад +10

    I just got into coding.. sometimes its hard for beginners like me to get a really simple and easy to understand tutorial. after watching your tutorial on "javascript" objects i found out that you are the one guy i was looking for. Thanks for your time on this man.

  • @pojer93
    @pojer93 5 лет назад +13

    first video i bumped in to. its nice i think i will watch whole series

  • @achengster4
    @achengster4 4 года назад +10

    I LOVE the way you select your words and how you’re consistent with ALL your examples. You are like a great short book in every episode.

  • @S1NA-Gaming
    @S1NA-Gaming 6 лет назад +10

    You are great. Your tutorials for PHP are the finest.

  • @erencool2367
    @erencool2367 4 года назад +1

    stuff like this should be boring.... but actually I had a lot of fun watching this vid :) ty again Daniel

  • @albertofabbri1543
    @albertofabbri1543 5 лет назад +2

    Very nice video but... can you talk a little bit slowly? It' hard to non-native speakers to keep up with you.

  • @nicolasap86
    @nicolasap86 4 года назад +1

    This looks like Elon Musk if we was teaching about Javascript back in the late 90's

  • @instaminox
    @instaminox 5 лет назад +1

    JS is not an Object oriented programming it is Object based it is different! it does not support polymorphism, encapsulation ect..

  • @aruns9491
    @aruns9491 6 лет назад +4

    One thing I don't understand is why you don't have so much views or subscribers.I mean even in a paid course they won't teach like you do,your content is good, voice is not boring,concepts and codes are easy to grasp..I feel bad for you bro, mark my words one day you'll be great

    • @Dani_Krossing
      @Dani_Krossing  6 лет назад

      Thanks :)

    • @mickeyslim1
      @mickeyslim1 3 года назад

      I second this beautiful honest and truthful statement. If all teachers were like you....👌

  • @thanossym2281
    @thanossym2281 3 года назад +1

    Thank you for your video!! you are good teacher!

  • @michaelhalcyon3658
    @michaelhalcyon3658 4 года назад +2

    Keep up the good work!

  • @rashmedo
    @rashmedo 4 года назад +1

    Brilliant explanation.. Yoda status in teaching

  • @omid443
    @omid443 6 лет назад +4

    Thanks for sharing your knowledge ...

  • @tatahfeli
    @tatahfeli Год назад +1

    Cheers, you just gained a new subscriber because of this video. It means a lot to me as a beginner in coding

  • @Adorict
    @Adorict Год назад +1

    Been learning JS for some time now and struggling with objects/constructors/factory functions and you are cementing the knowledge in my brain. Thank you sir.

  • @shinevisionsv
    @shinevisionsv 6 лет назад +5

    Awesome video as always!

  • @MrVirkMedia
    @MrVirkMedia 5 лет назад +1

    awesome thanks

  • @mkt92z
    @mkt92z 5 лет назад +1

    Isn't the first example you gave (where you used the new keyword) also considered a constructor? I thought those were called empty object constructors or something like that. Anyways great video, as always!

  • @tatahfeli
    @tatahfeli Год назад +1

    Thank you. So detailed

  • @chrisarrow
    @chrisarrow 6 лет назад +1

    8:35 wouldn't it be better to use this.age instead of person.age?

  • @darrenlefcoe
    @darrenlefcoe 4 года назад

    see link to a similar video that might support Objects in JS:
    ruclips.net/video/cG4GGCOU3i0/видео.html

  • @suparthghimire1644
    @suparthghimire1644 4 года назад

    Hey the only thins i dont understand abouit js object is
    Unlike in c++, we require a class before making an object.
    BUt here,
    let person = {...}
    Automatically makes an object, that refers to which class?

  • @panchalankit07
    @panchalankit07 5 лет назад +1

    Thanks for this Video, its very useful

  • @paudelamarianaoancea3761
    @paudelamarianaoancea3761 5 лет назад +2

    interesting ! nice explanation dude.

  • @nasriddinbekbektemirov5796
    @nasriddinbekbektemirov5796 4 года назад +1

    Dude You are awesome

  • @Leo-pm5cj
    @Leo-pm5cj 2 года назад

    How can I create one object and put inside few keys without value? Value I will put in prompt though browser. How can I do it?

  • @atlantean.prince
    @atlantean.prince 3 года назад +1

    thank you King

  • @index8983
    @index8983 5 лет назад +1

    Very nice video

  • @aayushsingh8885
    @aayushsingh8885 5 лет назад +1

    Can u teach express as backened with mongodb sir

  • @davidhahn8583
    @davidhahn8583 4 года назад +1

    you are a gifted teacher. thank you for making your channel.

  • @dhojebonufang
    @dhojebonufang 5 лет назад +1

    G-avaScript

  • @simoo7755
    @simoo7755 4 года назад +1

    thank you!

  • @vegasvato55
    @vegasvato55 3 года назад

    ONCE THE CLASS CONSTRUCTOR IS CALLED AND CREATES THE NEW OBJECT, HOW DO I GET THE NEW OBJECT INTO AN OBJECT ARRAY???
    HOW DO I GET A NEW PERSON OBJECT FROM THE NEW PERSON CONSTRUCTUR INTO THE PERSONS ARRAY???

  • @Auzep
    @Auzep 5 лет назад +1

    Frameworks make so much sense now that I'm understanding JS lol. Thanks for your videos!

  • @calibr0636
    @calibr0636 5 лет назад +2

    Nice vid man, can’t believe I’ve made it this far.

  • @sidiebnou4958
    @sidiebnou4958 Год назад

    bro you waist so much time in your intos. Just get in the subject very fast. I think that better for your channel.

  • @remedyjohnson
    @remedyjohnson Год назад

    Just know we still watching your tutorials
    And their helpful

  • @ChrisTian-ox5nr
    @ChrisTian-ox5nr 4 года назад +1

    Thank youuuuuu!

  • @namanchoudhary2501
    @namanchoudhary2501 6 лет назад +1

    Pls make an exersice video for object

  • @shortandsimple7976
    @shortandsimple7976 4 года назад

    Good explanation. I also added video about different ways to create JavaScript object. Your evaluation and tips would be great

  • @cliffordfolefac7754
    @cliffordfolefac7754 3 года назад

    Who else is just kicking off with javascript here

  • @koki6761
    @koki6761 Год назад

    Hey Daniel, I just want to thank you for making this JavaScript tutorial video. Your javaScript tutorial playlist is the perfect, short with well packed information that a bigger student could understand in a short time without getting confused with a lot of coding. You have no idea how many tutorials I've been watching to Learn Javascript. Some of them take 3 to 5 hr to finish. Even with the time stamp it's complicated to understand, but now I'm glad finally I found your videos. THANK YOU SO MUCH Dani!!! keep the good work.

  • @mohammadmohammadi4291
    @mohammadmohammadi4291 5 лет назад +1

    Great tutorial

  • @evilseed880
    @evilseed880 6 лет назад +1

    This is one of the best tutorials out there for basic objects. Short, sweet and to the point.

  • @kriskoeh6901
    @kriskoeh6901 3 года назад

    Please create more Javascript videos. I have been through all of youtube and you’re the first person that made it click. Make a whole course. Will buy. 🤣 I’m desperate here.

  • @pjf7044
    @pjf7044 2 года назад

    Very nice and clean! Ive seen other people start it using var person = { name: "daniel", age: "13"} etc but thats get confusing when later on they start doing the dot syntax. I think its easier to just start with the more complex and then simplify from there if need be.

  • @muramasa7537
    @muramasa7537 6 лет назад

    This is my first time learning a programming language , so idk much bout how stuff works . So...what are objects used for in games or apps making ?

  • @youcefdebih2660
    @youcefdebih2660 5 лет назад

    Awesome Video ! Thank you sir ! but I have Just one Question ! What's the difference between using “let” and “var” to declare a variable in JavaScript?

  • @SuperSamsosa
    @SuperSamsosa 4 года назад

    very sound teaching. The way you explain makes it as easy as one can figure to understand. Btw what is that backgroung noise, sounds like a snoring pet, if you listen real close with headphones on.

  • @Anonymous-qv5ym
    @Anonymous-qv5ym 6 лет назад +1

    Thank you so much for the informative video :D

  • @hhmr345
    @hhmr345 2 года назад

    awesome video bro really good job 100 / 100

  • @skylerspillers9104
    @skylerspillers9104 2 года назад

    This guy reminds me of Elon Musk

  • @duvanxo3033
    @duvanxo3033 2 года назад

    Great information. Thank you!

  • @ingiben4889
    @ingiben4889 4 года назад +1

    god bless, thank you

  • @blackburd
    @blackburd 2 года назад

    Awesome tutorial, great speed for me.

  • @ShaneCrouch
    @ShaneCrouch 6 лет назад +2

    Well done!

  • @amosmachora
    @amosmachora 2 года назад

    My guy and his hands. Please dont stop

  • @MasterCorneilous
    @MasterCorneilous 2 года назад

    What's the difference between var and let or is let more like function? Idk

    • @Dani_Krossing
      @Dani_Krossing  2 года назад

      I explained the difference in lesson 17 in this course. 🙂

  • @reidwilliamson6477
    @reidwilliamson6477 3 года назад

    Thanks Dani, much love

  • @wibudesu205
    @wibudesu205 6 лет назад +1

    Thanks for ur tutorials

  • @jondyason336
    @jondyason336 6 лет назад +1

    awesome. thanks!

  • @fraileneflores1937
    @fraileneflores1937 3 года назад

    I hope I'm as genius as you sir!

  • @Richard-wh6wg
    @Richard-wh6wg 5 лет назад

    I had some knowledge of this global object, method and properties and things like that, but I've never found someone who could explain to me what exactly they are, until now. Thanks for the video mate

  • @erickchavez4551
    @erickchavez4551 3 года назад

    Nicely explained :) Thanks a bunch!

  • @TheMclovinfromhawaii
    @TheMclovinfromhawaii 5 лет назад +1

    Thank you for the lesson! Cheers

  • @DanielCardenas23
    @DanielCardenas23 6 лет назад

    89' baby! Woot woot! Only 2 years older.

  • @mrspock3889
    @mrspock3889 5 лет назад

    I little bit confused about the "new" why to use "new" keyword to create an object
    when you can create the same object with obj{} example:
    var obj = {
    something : 'somevalue'
    };
    or just an empty object obj= {}
    instead of var obj = new Object() ?

    • @Dani_Krossing
      @Dani_Krossing  5 лет назад

      The two methods I show are just two different ways to create an object. The methods are called "new Object" and "object literal". For simplicity, readability and execution speed, use object literal when creating objects. The "new Object" method is pretty much a discouraged method today.
      Here is a link that explains it in more detail: coderwall.com/p/p5cf5w/different-ways-of-creating-an-object-in-javascript

  • @ОлександрМета
    @ОлександрМета 2 года назад

    Really good tutorial, now JS has more sense for me

  • @mavoolumma
    @mavoolumma 2 года назад

    Thank you Dani !

  • @jeremyllewellynhamill-keay5347
    @jeremyllewellynhamill-keay5347 3 года назад

    thank you, better than paid courses on udemy

  • @dr_corrupt1014
    @dr_corrupt1014 2 года назад

    great teacher

  • @mickeyslim1
    @mickeyslim1 3 года назад

    Thanks, man.

  • @abunurullah2340
    @abunurullah2340 2 года назад

    manay manay thanks

  • @peculiarmichael874
    @peculiarmichael874 Год назад

    Awesome!

  • @maxmustermann7211
    @maxmustermann7211 3 года назад

    Cool guy

  • @AJHF1991
    @AJHF1991 2 года назад

    Very well explained, thanks! :)

  • @christophercudiamat5695
    @christophercudiamat5695 5 лет назад

    as a visual learner im learning more about js with his actions haha.i do the same thing whrn trying to explain my self some concepts

  • @Black1sheep92
    @Black1sheep92 5 лет назад

    Trying to figure out the accent. Definitely a Scandinavian but not Swedish accent because, we don´t sound exactly like that but close. It´s not Norwegian because you don´t sound that gay, so you must be from Denmark.

  • @namanchoudhary2501
    @namanchoudhary2501 6 лет назад +3

    As usual you explains very well and bla bla bla... 😂😂

  • @rashmedo
    @rashmedo 4 года назад

    you are Yoda ! Solid tutorial

  • @NERO-ez1mn
    @NERO-ez1mn 6 лет назад

    so object variables are list of arrays in a single variable?

  • @growguild1556
    @growguild1556 6 лет назад

    day by day you are changing my life thank you Daniel :) this will come back to you times infinity!

  • @incognitoincognitov8349
    @incognitoincognitov8349 5 лет назад

    4:20 Do you instantly create a property of an object(person) when you write person.name or is it buildin?

  • @imtheevil1524
    @imtheevil1524 6 лет назад

    what means return ++person.age; ++ ?

  • @theseigemeister
    @theseigemeister 3 года назад

    This is great, thank you!

  • @youdahetsehaye2187
    @youdahetsehaye2187 5 лет назад

    Awesome video. Thanks

  • @cybergen2K
    @cybergen2K 6 лет назад

    Why do we have objects if we only ever seem to work with one object at a time? Can people please give me example of where we use multiple objects?

    • @Dani_Krossing
      @Dani_Krossing  6 лет назад +2

      An example of multiple objects could be if create web page that has video tutorials on it people can interact with.
      He we could have a Course object, a User object, a Comment object, etc... Essentially we create an object for anything that has similar information or functions tied to it.

    • @namanchoudhary2501
      @namanchoudhary2501 6 лет назад +1

      mmtuts Pls make an exersice video too
      For this explaination

  • @germanduterte7110
    @germanduterte7110 4 года назад

    He is a very great teacher

  • @namanchoudhary2501
    @namanchoudhary2501 6 лет назад +2

    I always practice javascript by watching your exercises in js

  • @barringdev7119
    @barringdev7119 5 лет назад

    0:10 It's not a bug, it's a feature.

  • @sol3cito33
    @sol3cito33 3 года назад

    Awesome tutorials, tusen takk!

  • @yongjung5433
    @yongjung5433 5 лет назад +1

    you are the man!

  • @isaacsnowcarini4808
    @isaacsnowcarini4808 4 года назад

    If you say “JavaScript” another time I m gonna start crying!

  • @krbse.3578
    @krbse.3578 6 лет назад

    In which video did we see why and when to use the "let"?

  • @namanchoudhary2501
    @namanchoudhary2501 6 лет назад +1

    Help him to grow.
    He is the best mentor i have ever seen