Sunday, February 1, 2015

Learn JavaScript from scratch

Well, this JavaScript glossary helps you learn the language basics.

My remarks:
JavaScript looks a type-loose easy language. The basics are not much different than C.
Anyway these are my notices:
1) The functions have 2 ways to be written. The non-hoisted form -which looks strange compared to what I know in C- is little ugly.
 I didn't see as well a function prototype as in C, but JavaScript took care of this by using the concept of a hoisted function. A function can be hoisted right from its definition; it has a pretty look (as in C), and the non-hoisted function has the ugly look.
2) I wasn't use to the console in C, but in the mentioned reference they covered the console which is useful for debugging since we can use the "Inspect Element (Q)" in Firefox by right-clicking in the browser.
3) As in object oriented programming (OOP), we can make an object without even defining a class. I haven't seen such thing in C++! This is really flexible. We're targeting 2 birds with one stone: a) declaring an object - b) without previous class or struct definition.
More on this is here.
4) Also in OOP, the mentioned reference webpage stated only the inheritance.

No comments:

Post a Comment