You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jlam55555 I see you keep using function () {} for callbacks. This was necessary for previous versions of javascript, but ES6 has arrow functions, which keep the this context of the outside function. Arrow functions don't need a var thisRef = this. Also we should be using let instead of var. I say this partially to be a hipster, but also because I started by using let and let has serious benefits over var in terms of scoping. Anyway, feel free to use ES6 because people can use that on chrome by default! yay!
(anyone correct me if I'm wrong please)
The text was updated successfully, but these errors were encountered:
@jlam55555 I see you keep using
function () {}
for callbacks. This was necessary for previous versions of javascript, but ES6 has arrow functions, which keep thethis
context of the outside function. Arrow functions don't need avar thisRef = this
. Also we should be usinglet
instead ofvar
. I say this partially to be a hipster, but also because I started by usinglet
andlet
has serious benefits overvar
in terms of scoping. Anyway, feel free to use ES6 because people can use that on chrome by default! yay!(anyone correct me if I'm wrong please)
The text was updated successfully, but these errors were encountered: