• Sunday , 31 May 2020

Beginner JavaScript Tutorial – 26 – Object Initializers

Code Canyon



Facebook – https://www.facebook.com/TheNewBoston-464114846956315/
GitHub – https://github.com/buckyroberts
Google+ – https://plus.google.com/+BuckyRoberts
LinkedIn – https://www.linkedin.com/in/buckyroberts
reddit – https://www.reddit.com/r/thenewboston/
Support – https://www.patreon.com/thenewboston
thenewboston – https://thenewboston.com/
Twitter – https://twitter.com/bucky_roberts

Original source

3d Ocean

Related Posts

29 Comments

  1. Potaishee
    May 18, 2019 at 05:59

    So apparently those are brackets and not parentheses. Damn you, 360p!

  2. TOMMY PRODUCTIONS
    May 18, 2019 at 05:59

    Yes you are Chinese now bow to your superior master monks

  3. Gaurav Pant
    May 18, 2019 at 05:59

    Bucky you made everything simple.
    Love the way you explain the things.

  4. nguyen anh tuan Nguyen
    May 18, 2019 at 05:59

    great lesson

  5. KenyanMangroveWaigi
    May 18, 2019 at 05:59

    "Sorry if I offended anyone that's Oriental" You didn't until you called them Orientals, Bucky! face-palm

  6. Tysom Liu
    May 18, 2019 at 05:59

    I am Chinese and I am offended

  7. KwangWon Lee
    May 18, 2019 at 05:59

    lol he loves 20 lol actually me either

  8. BroLord
    May 18, 2019 at 05:59

    why do you love Taylor Swift ? Is she da Quen ?

  9. Gurpreet Singh
    May 18, 2019 at 05:59

    It is like python dictionary

  10. Abdullah Al Noman Rifat
    May 18, 2019 at 05:59

    Bucky was obsessed for Taylor Swift.

  11. moh laghzal
    May 18, 2019 at 05:59

    this lesson is bucky

  12. Commentator541
    May 18, 2019 at 05:59

    I love the series but have had to laugh at the ageist and racist remarks ahhaha. Just an fyi "oriental" is not a politically correct term. Hahaa

  13. Damian Dassen
    May 18, 2019 at 05:59

    wait, you love taylor swift because she is 20?

  14. Lei Sheng
    May 18, 2019 at 05:59

    If you want a little more technical information, here: This is also known as JavaScript Object Notation, or JSON. You can make .json files and use this object notation to store a lot of data. According to json.org, it's meant to be a lightweight format to exchange data and is a subset of the JavaScript programming language. You can use json data in other programming languages such as C++, C#, Python, etc. I personally have used it in Python with NHL.com as that is the format used with all NHL.com queries to obtain players stats and live scores. Python has add-on's that parse the JSON data for you and puts it into a list (it may even have a built in JSON parser, but I can't remember). So basically you can use it to exchange data between your different programs, it's quite handy.

  15. Efdf Fsdfsd
    May 18, 2019 at 05:59

    <body>
    <script type="text/javascript">
    var a = prompt();
    var b = prompt();
    c=a+b;
    document.write(c);
    </script>

    </body>
    </html>

    why this dont show the value of C on the page?

  16. PlanetWorkout Tv
    May 18, 2019 at 05:59

    not work i dont know why

  17. assassind95
    May 18, 2019 at 05:59

    today this is one of the most common date types on entire WEB. It is called JSON, and if u learn to manipulate them, u can call urself master of JS.

  18. asdf
    May 18, 2019 at 05:59

    why my browser prints my code, not runs it, when I have 2 javascripts ?

  19. Sons of Eden
    May 18, 2019 at 05:59

    Bucky you are badass at explaining objects. I've been struggling to get a simple understanding of exactly how they work. Thanks man.

  20. Harsh Rajmachikar
    May 18, 2019 at 05:59

    I love how all my fellow Indian/ Pakistanis are calling Bucky 'Sir'.

  21. Kaf Laskar
    May 18, 2019 at 05:59

    Guys
    is this the same?

    <script>
    function person(firstName, lastName, Age) {
    return {
    firstName: firstName,
    lastName: lastName,
    Age: Age
    }
    }

    var bucky = person("Bucky", "Robert", 24);
    var taylor = person("Taylor", "Swift", 20);

    document.write(bucky.firstName + " " + bucky.lastName + " Age: " + bucky.Age + "<br />");
    document.write(taylor.firstName + " " + taylor.lastName + " Age: " + taylor.Age);
    </script>

  22. Ayyaz Ahmad
    May 18, 2019 at 05:59

    Thanks!
    This is for you Bucky.
    <html>
    <head>
    <script type="text/javascript">
    person = {name:"We all"};
    function explore(love){
    this.love = love;
    }
    var we = new explore(" love Bucky");
    function loop(){
    var l = 1;
    do{
    document.write(l + ". " + person.name + we.love + "<br/>");
    l++;
    }while(l<21);
    }

    </script>
    </head>
    <body>
    <button onClick="loop();" >Explore</button>
    </body>
    </html>

  23. Avera
    May 18, 2019 at 05:59

    2:46 At this moment, Bucky created the character Soso in the TV show Orange Is The New Black. Time Traveler confirmed (;

  24. Gmoney Mozart
    May 18, 2019 at 05:59

    I couldn't get this to run. Using google chrome. No biggie. Moving along.

  25. Sunnydftw
    May 18, 2019 at 05:59

    <html>
    <head>
    <script type="text/javascript">
    jon = {name: "John Doe", age: 21, height: "185cm"};
    taylor = {name: "Taylor Swift", age: 21};
    </script>
    </head>
    <body>
    <script type="text/javascript">
    document.write (jon.height);
    </script>
    </body>
    </html>

    I get undefined

  26. hzy
    May 18, 2019 at 05:59

    WOAH
    i was adding a new property for "food" and was typing out "chinese"
    exactly the same time that he said "what am i, chinese?"
    fucking matrix yo, what are the chances

  27. Ritesh Kumar
    May 18, 2019 at 05:59

    how do you get the user to input values for objects ? like through a text box for example ?

  28. nur mohammed
    May 18, 2019 at 05:59

    sir loves taylor swift … 😀

  29. aequabit
    May 18, 2019 at 05:59

    Lua, JS and PHP are very beautiful and similar languages. Love them!

Leave A Comment

You must be logged in to post a comment.