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 responses to “Beginner JavaScript Tutorial – 26 – Object Initializers”
So apparently those are brackets and not parentheses. Damn you, 360p!
Yes you are Chinese now bow to your superior master monks
Bucky you made everything simple.
Love the way you explain the things.
great lesson
"Sorry if I offended anyone that's Oriental" You didn't until you called them Orientals, Bucky! face-palm
I am Chinese and I am offended
lol he loves 20 lol actually me either
why do you love Taylor Swift ? Is she da Quen ?
It is like python dictionary
Bucky was obsessed for Taylor Swift.
this lesson is bucky
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
wait, you love taylor swift because she is 20?
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.
<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?
not work i dont know why
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.
why my browser prints my code, not runs it, when I have 2 javascripts ?
Bucky you are badass at explaining objects. I've been struggling to get a simple understanding of exactly how they work. Thanks man.
I love how all my fellow Indian/ Pakistanis are calling Bucky 'Sir'.
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>
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>
2:46 At this moment, Bucky created the character Soso in the TV show Orange Is The New Black. Time Traveler confirmed (;
I couldn't get this to run. Using google chrome. No biggie. Moving along.
<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
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
how do you get the user to input values for objects ? like through a text box for example ?
sir loves taylor swift … 😀
Lua, JS and PHP are very beautiful and similar languages. Love them!