News for hackers. Stuff that matters.
Re:153k Ether Stolen in Parity Multi-Sig Attack by z3t4 on Thursday July 20, 2017 @05:41AM (#14811116)
In javaScript, the following lines does different things:

  "use strict";
  foo = 1;
  var bar = 1;
"foo=1" changes the variable foo (this is very useful) and "var bar=1" creates variable bar and adds it to the function/lexical scope. If the variable foo is not created/declared, it will throw an error! But without "use strict", "foo=1" would add variable foo to the global scope! Which might create unexpected bugs if you are used to other languages that does the sane thing and adds it to the local function/lexical scope. So I suggest to always "use strict" !

There are no comments on this comment yet.