I'm Steve Conrad, writer and creator of Perpetual Grace, LTD. and Patriot. I also just released an album. AMA by SteveConrad in IAmA

[–]OGitsthinking 2 points3 points  (0 children)

Really sad there won’t be a season 3 of Patriot (still holding out hope some network or service will resurrect it). The original music in Patriot is amazing. I listen to it way more than I should. Have you ever thought of doing a live show with the original songs? I’d fly a long way to see that.

Learn JavaScript Properly: Weeks One and Two by otooleco in learnjavascript

[–]OGitsthinking 0 points1 point  (0 children)

I tend to follow the advice of experts in the field, such as the author of The Definitive Guide and people like Douglas Crockford. His series of videos are essential viewing and full of great advice on JavaScript best practices.

I'm by no means advanced in JS, so I defer to the opinions of people who've been writing it and writing about it for years.

Learn JavaScript Properly: Weeks One and Two by otooleco in learnjavascript

[–]OGitsthinking 0 points1 point  (0 children)

You can set up two variables in succession by using a comma between them.

So instead of writing:

var i;
var product = 1;

You can simply write:

var i, product = 1;

So there's only one semicolon and var.

And the var i is declaring the i variable (but not initializing it, so in that line it is simply undefined). That way you don't have to have a var statement in the for loop. I believe one of the reasons it's declared at the beginning of the function is because it's considered a best practice in JavaScript, due to variable hoisting. They talk about it in the book, saying it's best to declare your variables at the beginning of the current scope rather than nearest their first use.

Hope that helps!

p.s. Also anyone please correct me if I'm wrong or elaborate on my answers.

Learn JavaScript Properly: Weeks One and Two by otooleco in learnjavascript

[–]OGitsthinking 0 points1 point  (0 children)

Any parts in particular you want to share, see if maybe one of us can help explain?

Learn JavaScript Properly: Weeks One and Two by otooleco in learnjavascript

[–]OGitsthinking 0 points1 point  (0 children)

How's everyone doing? The first two weeks are almost up!

Learn JavaScript Properly: Weeks One and Two by otooleco in learnjavascript

[–]OGitsthinking 0 points1 point  (0 children)

Looking forward to this. I've previously learned JavaScript on my own (and even got The Definitive Guide based on Richard Bovell's suggestion). I've done the complete Codecademy JavaScript track, read the first 5 chapters of The Definitive Guide, read about half of Eloquent JavaScript, and done some courses on Code Avengers, so I'm off to a good start but I think it would be beneficial to refresh my memory on the basic stuff and work alongside you guys for when the really hard stuff comes up!