O’Reilly JavaScript

(I read Japanese version)

Sure, I have been using JavaScript. But I do not detail about JavaScript itself.

Things TIL about JavaScript:

  • Many semicolons can be omitted.
    • If the end of statement are return, some of semicolons in there can be omitted. (Not at all)
    • I have known that semicolons before end braces can be omitted.
  • In contrast, “return true;” becomes “return; true;”
    • There is some cases like this.
  • “var” and “function” can be referenced before their declaration because of ROLLING UP.
    • I had not been paying attention about it.
    • I had believed that “function hoge(){” and “hoge = function(){” are equivalence. But it is not. No ROLLING UP in the latter.
  • “void” is an operator.
    • It is always evaluated as undefined.
  • “debugger” statement
    • Programs break at the statement.
  • “bind” Method
    • I had always made closures for doing same.

I haven’t read the latter half about libraries. Of course, probably I do not know large part of them.

Leave a Reply

Your email address will not be published. Required fields are marked *