Re:153k Ether Stolen in Parity Multi-Sig Attack
by positivecomment on Thursday July 20, 2017 @08:02AM
(#14811682)
I thought using "var" is deprecated... If there's anyone who has the chance to use let/const but still doesn't, I'd be very curious to learn about their reasoning
Re:153k Ether Stolen in Parity Multi-Sig Attack
by seangrogg on Thursday July 20, 2017 @11:54AM
(#14813560)
Bad habits, arguably. Been using JS for years so occasionally instances where a more vigilant self would use "let" still get "var" instead. I think part of this is because of issues with previous versions of v8/node where using let at the global level or without 'use strict' threw errors.
That being said, "const" is already hardwired.
Re:153k Ether Stolen in Parity Multi-Sig Attack
by vazhifarer on Thursday July 20, 2017 @02:11PM
(#14814947)
I know right. Principle of least Privilege. Simple.
The default best practice, you mean? Declaring with 'var' will still get you the same lexical scoping rules as always.
I believe OP meant 'inherited from pre-ES6 JS'