Beginner JavaScript Tutorial – 26 – Object Initializers



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

29 thoughts on “Beginner JavaScript Tutorial – 26 – Object Initializers

  • May 18, 2019 at 05:59
    Permalink

    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

  • May 18, 2019 at 05:59
    Permalink

    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.

  • May 18, 2019 at 05:59
    Permalink

    <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?

  • May 18, 2019 at 05:59
    Permalink

    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.

  • May 18, 2019 at 05:59
    Permalink

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

  • May 18, 2019 at 05:59
    Permalink

    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>

  • May 18, 2019 at 05:59
    Permalink

    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>

  • May 18, 2019 at 05:59
    Permalink

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

  • May 18, 2019 at 05:59
    Permalink

    <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

  • May 18, 2019 at 05:59
    Permalink

    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

Leave a Reply