Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#5 Code example from "JSON: What It Is, How It Works, & How to Use It"
var family = {
"jason" : {
"name" : "Jason Lengstorf",
"age" : "24",
"gender" : "male"
},
"kyle" : {
"name" : "Kyle Lengstorf",
"age" : "21",
"gender" : "male"
}
}
@mkim17

This comment has been minimized.

Show comment Hide comment
@mkim17

mkim17 Jun 18, 2015

Hey Jason, just wondering, does the last close curly brace on line 12 need a semicolon after it? Thank you for the tutorial by the way, it's been very helpful and intuitive

mkim17 commented Jun 18, 2015

Hey Jason, just wondering, does the last close curly brace on line 12 need a semicolon after it? Thank you for the tutorial by the way, it's been very helpful and intuitive

@namansancheti

This comment has been minimized.

Show comment Hide comment
@namansancheti

namansancheti Jun 25, 2015

Same doubt...there should be a semicolon, isn't it..?

Same doubt...there should be a semicolon, isn't it..?

@zia-ict

This comment has been minimized.

Show comment Hide comment
@zia-ict

zia-ict Jun 26, 2015

a semicolon is needed after curly brace on line 12.

zia-ict commented Jun 26, 2015

a semicolon is needed after curly brace on line 12.

@saif-ur-rehman

This comment has been minimized.

Show comment Hide comment
@saif-ur-rehman

saif-ur-rehman Jun 29, 2015

Thanks for this helpful explanation

Thanks for this helpful explanation

@Lc0rE

This comment has been minimized.

Show comment Hide comment
@Lc0rE

Lc0rE Jul 30, 2015

If you paste the code on http://jsonlint.com/ (without the var family =), he will give back an error with the semicolon at the line 12. Are we sure it is correct?

Lc0rE commented Jul 30, 2015

If you paste the code on http://jsonlint.com/ (without the var family =), he will give back an error with the semicolon at the line 12. Are we sure it is correct?

@5ervant

This comment has been minimized.

Show comment Hide comment
@5ervant

5ervant Aug 7, 2015

A semicolon after the curly brace on line 12 is optional: https://jsfiddle.net/0y36hbhg/
Just like a console.debug() that's not ending with a semicolon but putting a semicolon after an executable line or block is highly recommended, it's proper coding practice.

5ervant commented Aug 7, 2015

A semicolon after the curly brace on line 12 is optional: https://jsfiddle.net/0y36hbhg/
Just like a console.debug() that's not ending with a semicolon but putting a semicolon after an executable line or block is highly recommended, it's proper coding practice.

@MoAhmedOS

This comment has been minimized.

Show comment Hide comment
@MoAhmedOS

MoAhmedOS Sep 12, 2015

How can I display all the data of objects inside this object in for-in loop to show in one page , like this example
https://gist.github.com/MohamDev/e064e49b10bd83d1af92

How can I display all the data of objects inside this object in for-in loop to show in one page , like this example
https://gist.github.com/MohamDev/e064e49b10bd83d1af92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment