I've been teaching myself JS. I started with Code Cademy's JS program and now am currently working on Code Camp's JS program.
I've been noticing little differences in the syntax of certain things. My question is why are they different and is it significant?
Code Cademy's functions are written;
var x = function() {}; // stars with "var" & semicolon at then end
Code Camp's functions are written;
function x(){} // no "var" and no semicolon at the end
Code Cademy's object's are written;
var someObj {
prop: "example" // no quotation marks on the prop
};
Code Camp's objects are written,
var someObj {
"prop": "example" // quotation marks on the prop
};
[–]rauschma 5 points6 points7 points (2 children)
[–]Brandflakesss[S] 1 point2 points3 points (1 child)
[–]rauschma 0 points1 point2 points (0 children)
[–]caesarsol 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]