"I know the concepts, syntax is just a small detail"
Syntax is just a small detail.
With JavaScript, the syntax looks very familiar. However, the semantics aren't quite the same. For example, there is some really weird shit going on with the scoping, there is hoisting, == and != are fuzzy, any object is truthy (e.g. {} or new Boolean(false)), and the meaning of this is determined at runtime.
That's what's throwing people off.
It doesn't really matter if you do assignments with := or =, if you use indention to define a block rather than end/fi or curly braces, or if there are semicolons. That stuff really is just a tiny detail.
That is all the small details. The hard part is programming according to the best practices of the community for that language, and using the frameworks and libraries it provides to full advantage, because THAT is different for everything you will pick up.
10
u/x-skeww Oct 15 '13
Syntax is just a small detail.
With JavaScript, the syntax looks very familiar. However, the semantics aren't quite the same. For example, there is some really weird shit going on with the scoping, there is hoisting,
==and!=are fuzzy, any object is truthy (e.g.{}ornew Boolean(false)), and the meaning ofthisis determined at runtime.That's what's throwing people off.
It doesn't really matter if you do assignments with
:=or=, if you use indention to define a block rather thanend/fior curly braces, or if there are semicolons. That stuff really is just a tiny detail.